Compare commits

...

236 Commits

Author SHA1 Message Date
b7bd0d6f76 Release 1.35 2025-01-04 16:32:41 +01:00
9688c3451c po/it: update translation 2025-01-04 16:32:28 +01:00
4d3731ea6b pck-update: support for --noprep (-p) option passed to rpm to skip prepare step 2025-01-04 14:16:58 +01:00
f00a282407 Release 1.34 2025-01-03 17:48:34 +01:00
275765b416 templates: remove insertion of %debug_package macro 2025-01-03 17:44:58 +01:00
b31cc77abf libspec.lib: remove log line added during development and testing 2025-01-03 17:41:28 +01:00
d8d0616776 Release 1.33 2024-12-29 20:28:52 +01:00
55541faa29 libspec.lib: no longer check for %debug_package macro since rpm 4.20 automatically manages the debug package 2024-12-29 20:26:02 +01:00
27c6c99aca Release 1.32 2024-12-27 15:55:54 +01:00
8b395cffa4 lib, plugins: use mktemp with -p /var/tmp to avoid disk full situations on tmpfs 2024-12-27 15:54:31 +01:00
6beb82631f Release 1.31 2024-11-10 18:54:16 +01:00
42cb6b3270 libnetwork: git.download: don't recreate package if already existing 2024-11-08 21:36:52 +01:00
85b067df45 libnetwork: remove warning on unexpected package version against git tag 2024-11-08 21:35:23 +01:00
baa246544c Release 1.30 2024-11-07 21:47:40 +01:00
57d1ff0548 pck-extract.in: use rpm2archive instead of rpm2cpio and /var/tmp instead of /tmp to overcome 4GB size limit 2024-11-07 21:47:06 +01:00
afaac46997 tests/test00_specsyntax.in: update curl user agent to fix 403 error from sourceforce 2024-11-05 11:46:40 +01:00
5dfc440765 Release 1.29 2024-10-12 20:47:35 +02:00
94a21a8788 tests: test00_specsyntax: add debug info for curl command line used 2024-10-12 20:47:00 +02:00
b789b54c9c templates: remove ldconfig in %post[un] scripts which are redundant since introduction of rpm filetrigger 2024-10-12 20:32:33 +02:00
c464b753d2 plugins/pck-update: autobuildreq: prefer solibs in libdir in case of multiple matches
(e.g. prefer /usr/lib64/libOpenCL.so.1 over /usr/lib64/cuda/libOpenCL.so.1)
2024-10-12 20:20:17 +02:00
7f203b27b0 Release 1.28.1 2024-06-13 14:48:18 +02:00
59dc0bab78 lib/libnetwork.lib.in: fix syntax typo in sed expression added in previous commit 2024-06-13 14:46:14 +02:00
d3be430dcc Release 1.28 2024-06-09 14:26:43 +02:00
fadd2fbc2e libnetwork.lib.in: replace '%2B' with '+' in RPMS and SRPMS file list retrieval 2024-06-09 14:25:32 +02:00
e5218ce90e Release 1.27 2024-05-24 12:10:38 +02:00
db9519fb64 templates/Makefile: install kf6 template previously added 2024-05-24 12:10:18 +02:00
4613acdc52 pck-update.in: set %_buildrootdir to tmppath_dir to preserve usual buildroot path since rpm 4.19 2024-05-24 12:04:56 +02:00
b391f4952c libapse.lib: support for user-agent in curl request 2024-04-15 12:17:36 +02:00
a12a4f740b Release 1.26 2024-02-08 17:32:51 +01:00
58171936d8 po/it: fix Makefile and update translations 2024-02-08 17:32:11 +01:00
7233b80200 lib/libnetwork.lib.in: make sure requested commit to checkout exists or fail 2024-02-08 17:23:01 +01:00
52f6c8266f conf/04-rpmbuild-format-unpackaged-filelist.conf: updates to support kde frameworks 6 and more 2024-02-08 17:22:10 +01:00
9984ff37e6 templates/kf6: new template for KDE Frameworks 6 2024-02-08 17:21:42 +01:00
81d72c34dc templates/ghc: update template 2024-02-08 17:21:28 +01:00
3097a7660a Release 1.25 2023-10-09 19:51:37 +02:00
d49ce64211 04-rpmbuild-format-unpackaged-filelist.conf: add support for %_docdir 2023-10-09 19:51:11 +02:00
14c8c2a24b Release 1.24 2023-10-03 19:44:48 +02:00
7a4493adc1 04-rpmbuild-format-unpackaged-filelist: make python 3.11 the default python3 2023-10-03 19:43:46 +02:00
8655efaeb5 libnetwork.lib.in: fix support for pkg names containing '+' characters by converting %2B encoding with + 2023-10-03 19:42:30 +02:00
c8aa6e032a Release 1.23 2023-09-10 17:02:23 +02:00
e3d8062ab8 conf/02-specfile-approved-licenses: added SPDX IDs list from https://opensource.org/licenses/ 2023-09-10 17:01:09 +02:00
43b346caec plugins/pck-update: check format_unpackaged_file_list_common before arch-specific list 2023-09-10 16:39:01 +02:00
8aa63ca871 Release 1.22 2023-08-27 19:50:08 +02:00
5af63af1b0 plugins/spec-create.in: cmake: use new macros since cmake 3.27.3-2mamba 2023-08-27 19:49:24 +02:00
a7972f338c plugins/spec-create: add LICENSES directory if present; templates/kde5: minor changes 2023-08-27 16:40:59 +02:00
1ea657115d Relaese 1.21 2023-08-19 20:32:51 +02:00
c4fadb252d 04-rpmbuild-format-unpackaged-filelist: support for recent python versions, systemd and pam 2023-08-19 19:59:12 +02:00
21c14fc931 spec-create.in: fix settings BuildRequires: meson for meson 2023-08-19 19:40:54 +02:00
7955acefc6 Release 1.20 2023-07-22 15:21:47 +02:00
33c9c564cf libnetwork.lib.in,pck-update.in: disable repository reachability check and dependency on the 'host' tool 2023-07-22 15:21:37 +02:00
0e6a1e8929 02-specfile-rpm-groups.conf: add System/Libraries/Ruby 2023-07-22 15:13:04 +02:00
8c5f060508 templates: add perl-build and update perl and ocaml-libs templates 2023-07-22 15:12:31 +02:00
c0c0c4cdc6 Release 1.19 2022-11-03 11:37:20 +01:00
f92eb6fea8 pck-update: remove warning for ld-linux* .so not found 2022-11-03 11:36:19 +01:00
0f2b6b2cd6 templates/{perl,python}: update with current production 2022-10-31 11:30:23 +01:00
480f556d15 pck-update: resolve using rpm libraries not reported by ldconfig 2022-10-31 11:29:52 +01:00
db27bffab2 templates: python: update to build and installed modules; rename setuptools based template to python-setuptools 2022-10-08 16:18:58 +02:00
f6b5836e2a Release 1.18.1 2022-10-08 16:17:16 +02:00
485c2fa685 pck-update.in: added --distro-rpm argument to redefine default configured DISTRO_rpm 2022-06-12 11:16:40 +02:00
81464a1fb5 Release 1.18.0 2022-06-10 16:15:48 +02:00
5c7c9f997e lib/libnetwork.lib.in: curl.ftp_command: autodetected webdav support for mkdir, rename-file and delete 2022-06-10 16:13:34 +02:00
c27fa91d93 conf/05-system-external-commands: exclude -debug packages from automatic installation 2022-06-01 16:11:38 +02:00
8bb5867637 templates: updates for python and ocaml-libs 2022-05-23 13:18:31 +02:00
d7ecd3c845 Release 1.17.0 2022-01-06 15:00:14 +01:00
8c47065d99 autospec.in: add copyright for openmamba maintained status by Silvan Calarco since 2013 2022-01-06 14:59:23 +01:00
3277e4f7ee Update distribution references in some comments 2022-01-06 14:50:42 +01:00
31237581ea conf/05-system-external-commands.conf: set '-apidocs-' and 'en|it' as default exclusion masks for installed subpackages 2022-01-06 14:38:14 +01:00
cf360aad1a plugins/pck-update: remove unwanted unresolved deps warnings since glibc 2.34 2022-01-06 14:30:30 +01:00
8264d45caf tests/test00_specsyntax: provide a fake user agent instead of culr default to prevent some sites from blocking 2022-01-06 14:25:46 +01:00
4c108739a2 libnetwork.lib: support for url-decoding git tag so it works with i.e. 'subproject%2F1.0' for 'subproject/1.0' 2022-01-06 14:20:26 +01:00
4cd140d0a5 po/it/autospec.po: added new translations 2022-01-06 14:12:17 +01:00
1281bc4a90 Makefile: dist-rpm: copy in RPM sources dir instead of automatically creating rpm 2022-01-06 14:02:18 +01:00
b4e0e036f2 templates/perl: remove comment expected to be removed by user 2022-01-06 13:40:17 +01:00
900f73cd77 conf/05-system-external-commands.conf: also add langpacks- to i18n packages filter 2021-12-08 10:38:18 +01:00
ec7448da73 conf/05-system-external-commands.conf: add -langpack- to i18n packages mask 2021-12-08 10:36:01 +01:00
87bcfb6ca7 templates: update default URLs and some other small changes 2021-05-19 19:55:23 +02:00
3474e9ee0e test00_specsyntax.in: add curl check for URL; automatic replace if redirect, error if url not orking (response code != 200) 2021-05-16 12:20:11 +02:00
459b367e95 02-specfile-formatting-rules: support for https protocol 2021-05-15 13:43:18 +02:00
7350b61bb2 pck-update.in: don't replace build requirement block if it contains a conditional macro; basic support for rich deps 2021-05-08 12:13:41 +02:00
5203151334 pck-update.in: add python dist deps as they are in build requirements block 2021-04-18 15:12:00 +02:00
308cd6bb7b pck-update.in: recreate SRPM after updating build requirements block 2021-04-18 15:05:56 +02:00
404ccd61a8 pck-update.in: add unresolved perl requirements as they are instead of warning message in build requirements 2021-04-18 15:03:10 +02:00
88490f3dfe libapse.lib.in: support for repology.org: add replace for \${search_name} in apse_uri; add jq JSON parse support via apse_jq
03-apse.conf: add repology.org and treat as obsolete all other sources by disabling or commenting them
2021-03-27 13:23:09 +01:00
b182afc54c templates/python: other updates/fixes to handle .egg-info in files list 2021-03-27 13:18:15 +01:00
1d53d2994f conf/05-system-external-commands.conf: call dnf with --skip-broken to at least install available build requirements (fixes autoport) 2021-03-16 21:38:32 +01:00
6d8566067b templates/python: don't put egg-info files in files.list because they need to be in %files section for rpm pythondistdeps.sh to add auto dependencies 2021-03-16 21:36:45 +01:00
f89da44c7b pck-update: remove --nodeps to build commands to fix build requirements being skipped. Not sure why it worked before and maybe this broke since rpm 4.16 2021-03-16 21:35:00 +01:00
695a354bd6 pck-update.in: remove unresolved .so requirement for ld-linux-aarch64.so.* 2021-03-14 11:38:06 +01:00
28a058dd07 pck-update.in: auto build requirements: fix finding correct python version and skip requirements for rtld() (ldconfig) 2021-03-14 11:24:42 +01:00
1747b898a2 Removed obsolete templates for kde3 and kde4 2021-02-24 18:01:51 +01:00
2e75799b80 templates: remove unused and deprecated BuildRoot tag from all templates 2021-02-24 17:52:54 +01:00
c3e90a144f pck-update.in: fix http+git and https+git protocols with preserve_dot_git support 2021-02-24 17:48:03 +01:00
bb706d3ef4 libnetwork.lib.in: fix SRPM download error for packages with '+' character (e.g. libxml++ did also match libxml++2) 2020-12-02 10:03:12 +01:00
3bcaa2cf38 pck-update.in: notify build requirements installation as warning instead of error so that SRPM installation is tried and autoport can parse the output 2020-12-01 12:53:21 +01:00
cabd7a8a1d Added basic aarch64 support, dropped ppc 2020-12-01 12:35:17 +01:00
662b5351be Release 1.16.8 2020-09-27 21:08:53 +02:00
72f530d381 dnf install support in configuration 2020-09-27 21:08:29 +02:00
66e607a4ca pck-update,linnetwork.lib: preserve .git directory if protocol is http[s]+git 2020-06-22 11:00:33 +02:00
169dcf8bb9 pck-update.in: don't archive any SRPMS with name matching SPEC_OBSOLETES as obsoletes refer to RPM names not SRPMS
This to support exclusive architecture legacy packages e.g. libsuitesparse4 (with ExclusiveArch: arm) obsoletes libsuitesparse (which does not build anymore on this target).
To be checked if this may break some other successful cases, although the problems in keeping a to-be-obsoleted package are less than archiving a to-be-kept one.
2020-02-01 02:13:12 +01:00
0372675fbd spec-create.in: support for Meson 2019-11-02 16:04:09 +01:00
fcdbf0fe9b libnetwork.lib: more support for https 2019-11-02 15:58:49 +01:00
b476080461 templates/kde5: add --with-html argument to %find_lang macro 2019-10-27 19:35:00 +01:00
38a689e2de libnetwork.lib.in: git sources: simple support for checking out at a specific commit by supporting the syntax: --git-branch branch[@commit_id] 2019-10-27 15:18:42 +01:00
08bfa59a98 libspec.lib: use rpmspec -P <specfile> instead of rpm -q --specedit ... if rpm 4 is detected 2019-06-25 22:21:20 +02:00
b20b079907 templates/python: don't strip required egg-info files out of files list 2017-11-15 15:13:58 +01:00
93bcf6bb6b libnetwork.lib: add --recursive to git clone commands to correctly fetch repositories with external subtrees 2017-10-31 16:57:10 +01:00
f4e08f4edc templates/kde5: add --with-man to %find_lang arguments
Signed-off-by: Silvan Calarco <silvan.calarco@mambasoft.it>
2017-09-11 11:13:51 +02:00
Davide Madrisan
ff91b95533 README: add libnetwork.lib to the list of libraries
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2017-09-10 15:09:41 +02:00
Davide Madrisan
6257d8d148 Update the README file
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2017-09-10 15:01:35 +02:00
Davide Madrisan
6ebbdc3161 conf/05-system-external-commands.conf: document yum usage
We're currenctly moving to the yum package manager.
Document the yum syntax for `rpm_download_and_install'.

Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2017-09-10 13:49:08 +02:00
Davide Madrisan
ac8046392b Add a README.md file
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2017-09-10 13:41:26 +02:00
Davide Madrisan
869ac846fe config-getvar: update the help message
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2016-10-16 19:19:27 +02:00
Davide Madrisan
495d49176b templates: python - fix comment
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2016-10-16 17:40:00 +02:00
2b1dbb0b1d pck-update.in: support for http+git and https+git fake protocols to indicate a git repository 2016-07-05 22:49:42 +02:00
b5b1121aee libnetwork.lib: support for git urls incompatibile with .git suffix (under testing) 2016-07-05 22:45:45 +02:00
99fd03d6a7 libapse.lib: ignore everything after a dash ('-') when checking for last version 2016-04-08 15:31:10 +02:00
Davide Madrisan
7761a49bb3 Update ChangeLog and NEWS
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2016-02-16 20:19:32 +01:00
Davide Madrisan
c357ffbc08 templates/python: multiversion package build
Add the rpm macros required for building both Python2 and Python3 packages
with a single specfile:

  python2:  rpmbuild -ba <specfile>
  python3:  rpmbuild -ba <specfile> --define="with_pyver 3"

Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2016-02-16 19:34:06 +01:00
28a476679d templates/kde5: (not very recent) updates to template 2015-09-26 15:07:31 +02:00
305f5ff3c6 04-..-filelist.conf: moving KDE4 icons to /usr/share/icons to share them with KF5 2015-09-26 15:04:23 +02:00
96207345da 03-apse.conf: use a mirror for distrowatch or they will ban your IP 2015-09-26 15:02:50 +02:00
41731ef882 libnetwork.lib: support for git repositories which don't have '.git' in their url 2015-09-26 15:00:22 +02:00
Davide Madrisan
564a5cb63b Release 1.16.6 'Tuscany'
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2015-05-07 20:25:46 +02:00
Davide Madrisan
3eed595297 Update the package Documentation
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2015-05-07 20:19:43 +02:00
Davide Madrisan
970b29e4a1 Add a basic support for the KDE Framework 5 packages
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2015-05-06 22:35:32 +02:00
2fa427ff26 pck-update: stricter checks on buildreqs with explicit arch 2015-04-16 00:34:36 +02:00
68ad87406c color-theme.web: make error text bolder to be more readable on red background 2015-04-14 22:21:27 +02:00
Davide Madrisan
36e4b14573 GHC template - improve the template and fix some indentations
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2015-04-12 19:26:41 +02:00
Davide Madrisan
faf2a81b00 libspec.lib - Accept the rpm token %global which defines macros in global context
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2015-03-29 18:40:01 +02:00
Davide Madrisan
4f100fc519 autospec.spec.in - Add some missing entries in the %changelog section
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2015-03-08 19:19:50 +01:00
Davide Madrisan
c55acfc48b Release 1.16.5
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2014-12-30 21:30:11 +01:00
Davide Madrisan
08f2e6f1a8 Changelog - Synchronize with git log
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2014-12-14 22:35:29 +01:00
Davide Madrisan
1ef49ec99d libnetwork.lib - use the builtin command 'type' instead of 'which'
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2014-12-14 22:31:27 +01:00
15013489c1 pck-update: always rebuild srpm when rpms are built unless --nosrpm is passed 2014-09-27 18:37:23 +02:00
5058e2121b pck_update: more changes on rpmbuildopt parameters ordering to workaround cross-arch builds
This is still a workaround to allow cross-arch builds with long rpm command lines
because it seems that rpmbuild is ignoring extra passed parameters when they
exceed a certain number (5 or 6 as far as I remember)
2014-09-26 13:28:11 +02:00
a2e617b4c2 pck-update: buildreqs_to_install: keep conservative classic behaviour on archs different from x86_64 2014-09-26 13:25:54 +02:00
b3419dc9c0 pck-update: fix duplicated names in BuildRequires: in multiarch systems (x86_64) 2014-09-26 13:13:14 +02:00
Davide Madrisan
5a4e8f799a tests: fix an obsolete and now unsupported syntax for 'find -perm'
tests/test01_pkgquality
tests/test02_pkgsecurity

Fix an obsolete and now unsupported syntax of the external tool 'find'
(-perm +<mode>) that made some quality and security tests fail.
The supported one is now: -perm /<mode>

Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2014-09-16 22:03:37 +02:00
Davide Madrisan
f172d7e6db Update the documentation files
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2014-09-15 21:40:41 +02:00
e5052816bb pkg-update: --target needs to be passed as last option to rpmbuild 2014-09-06 01:06:02 +02:00
ec9f775c87 pck-update: support for package.arch specfile build requirement
When this form of requirement is detected it is converted to package@arch as required by smart.
Also add comments and a FIXME about a problem with previous patch of this code and noarch packages.
2014-09-04 14:01:45 +02:00
Davide Madrisan
6f965f674b pck-update - apply the architecture dependent rules first
Apply the architecture dependent rules for unpackaged files
before the common ones.  This will also simplify the logic
of the path substitutions.

Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2014-08-26 19:59:50 +02:00
Davide Madrisan
609e1425ea 04-rpmbuild-format-unpackaged-filelist.conf - add kde4 rules for x86_64
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2014-08-26 19:17:55 +02:00
Davide Madrisan
26856b5b71 spec-create: Honour the pck version set by the user for specs generated from git
specfile.create(): always execute 'git.create_tarball()' with the option
'--pck-version'. This way a user-provided package version will be used
instead of the default one.

This patch will permit to force a user defined package version when desired.

Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2014-08-20 21:00:14 +02:00
Davide Madrisan
0ae1946627 spec-create - remove unused code
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2014-08-19 21:41:49 +02:00
Davide Madrisan
93f2d120e9 spec-create: add support for tarballs with autogen.sh and no configure
Create a correct %build block in the specfile generated from tarballs
that do not provide any 'configure' script but only an 'autogen,sh' one.
Feature asked by Silvan Calarco.

Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2014-08-18 22:26:15 +02:00
Davide Madrisan
9458f64b1d 04-rpmbuild-format-unpackaged-filelist.conf - add 'python3_sitelib' (x86_64)
The x86_64 architecture needs an extra line:

   /usr/lib/python3.3/site-packages --> %{python3_sitelib}

as was pointed out by Silvan.

Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2014-08-18 19:26:29 +02:00
Davide Madrisan
bcb23e7e45 Update the documentation files
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2014-08-13 22:43:22 +02:00
Davide Madrisan
d4e5b9a752 pck-update: fix the unpackaged files list issues (x86_64 only)
conf/04-rpmbuild-format-unpackaged-filelist.conf
Split the translation rules for the unpackaged files into a common block
('format_unpackaged_file_list_common') and an architecture-specific file
per supported architecture (currently 'i586' and 'x86_64').
This solves the problem of some wrongly filenames reported by autospec
when running on the x86_64 architecture.

The translation rules for Python 2.7 and Python 3 have been updated
to reflect the current support for Python in openmamba.

Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2014-08-13 20:54:02 +02:00
b767938678 libnetwork.lib: quick fix: .git suffix is not optional when cloning from http/https urls 2014-07-08 18:09:24 +02:00
e94617662e autospec.po: add missing italian translation strings for ghc
File has also been reordered by tool called by Makefile
2014-05-27 13:40:45 +02:00
c4e2f98d93 pck-update: specify target_cpu when installing build requirements for x86_64 multiarch support 2014-02-22 22:36:10 +01:00
a23800a2b6 templates/python: remove unexisting option --single-version-externally-managed 2013-12-14 14:15:17 +01:00
bd287516e3 Merge branch 'master' of ssh://git.openmamba.org:4444/autospec 2013-12-09 10:50:36 +01:00
a7db8b7c72 templates/ghc: new template for ghc modules 2013-12-09 10:49:41 +01:00
Davide Madrisan
169fdd13f5 pck-update: package.generate_name(): return the correct value
when executed without the option '-p'.

Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2013-11-24 20:49:28 +01:00
Davide Madrisan
c9aea5b6a5 documentation: update VERSION
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2013-11-09 22:12:46 +01:00
Davide Madrisan
80098fcc60 documentation: update ChangeLog and NEWS
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2013-11-09 21:47:52 +01:00
Davide Madrisan
c44c81249f documentation: update the italian manpage
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2013-11-08 20:34:05 +01:00
Davide Madrisan
1b62dc674c autospec, pck-update: Update the copyleft messages
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2013-11-07 23:23:30 +01:00
Davide Madrisan
703a7f61a5 ChangeLog: document the two last Silvan's patches
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2013-11-07 23:14:41 +01:00
Davide Madrisan
c8f985bd1f autospec.po: add missing italian translation strings
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2013-11-07 23:08:54 +01:00
38ccd4e178 spec-create: new options '--packager-fullname' and '--packager-email' 2013-11-07 22:45:44 +01:00
291f42297b pck-update: new options '--packager-fullname' and '--packager-email' 2013-11-07 22:45:02 +01:00
Davide Madrisan
e2d0437f60 pck-update: new function package.generate_name()
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2013-11-05 22:38:22 +01:00
Davide Madrisan
0cc7bf9f89 ChangeLog: add missing entries
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2013-08-04 22:42:06 +02:00
653fc9cd35 libnetwork.lib: never use '--depth=1' when cloning from http and https git urls
- fix necessary and tested with code.google.com
- additionally print full 'git clone ..' command line used in debug output
2013-08-04 22:34:00 +02:00
eb1d352c92 pck-update: fix update of git urls starting with http:// and https://
Source URLs from git don't just end with '.git', btw they can be detected by searching for '.git/'
2013-08-04 22:32:56 +02:00
46ec87de31 pck-update: don't clone from git repository at every build is source with current version already exists 2013-08-04 22:23:50 +02:00
Davide Madrisan
42400bcded Mark the new autospec version as "Korbielow".
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2013-07-19 21:50:44 +02:00
Davide Madrisan
f1ba975689 test framework: remove the duplicate check for poor infopages installation
implemented in the module 'test00_specsyntax' and improve the test coded
   in 'test01_pkgquality' and its related help message.

Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2013-07-19 21:47:18 +02:00
Davide Madrisan
5e8e99ecdc New autospec template ocaml-libs for OCaml libraries.
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2013-07-19 21:33:20 +02:00
Davide Madrisan
b4e680004a conf/02-specfile-rpm-groups.conf:
Add rpm groups for OCaml libraries and development packages.

Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2013-07-19 18:41:45 +02:00
Davide Madrisan
b21d192d8f test01_pkgquality:
Check for wrong file attributes in bin and lib directories.

Do ignore files with name matching '*.so.owner'.
These are text files needed by OCaml, not libraries.

Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2013-07-19 18:39:18 +02:00
Davide Madrisan
b4f20819f9 t01_pkgquality: modify regexp to catch OCaml library files
when testing for bad BuildArch tags

Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2013-07-19 18:37:44 +02:00
Davide Madrisan
69a4080a61 libtest.lib: fix two broken calls to 'notify()'
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2013-07-19 18:35:36 +02:00
b597848f6b pck-update: fix build requirements generation with multiple providers
When --whatprovides returns multiple requirements only consider the first one.
Seen with mono(..) requirements in monodevelop.
2013-07-17 14:32:17 +02:00
fcdf10374f Update translation for string intoduced in previous commit 2013-07-13 16:01:49 +02:00
8b06b41b20 pck-update, libspec, libapse: support for a special specfile macro to disable scraping from specified sources
E.g.: enter the macro below in the specfile to disable scrape sources with indexes 0,2 and 4:
2013-06-05 00:23:06 +02:00
85d14ca35f pck-update: pass rpmbuild_opts to 'rpmbuild -bl' to fix unpackaged files list formatting with some configurations 2013-05-07 15:00:39 +02:00
927ad3a5f7 libnetwork.lib: git source: add support for branch names containing slashes 2013-05-05 21:25:27 +02:00
Davide Madrisan
166e4ad848 Release 1.16.3
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2013-03-04 22:38:04 +01:00
Davide Madrisan
22ab8563e3 autospec.po: remove duplicate tranlation
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2013-03-04 22:36:42 +01:00
Davide Madrisan
c782b0936d NEW: update documentation
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2013-03-04 22:32:42 +01:00
Davide Madrisan
617a555c47 Changelog: the new template 'web' is an improvement not a bugfix
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2013-03-04 22:24:04 +01:00
Davide Madrisan
2f42c957ac Documentation: new target 'web': update italian manpage and the help messages of spec-create
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2013-03-04 22:19:53 +01:00
Davide Madrisan
4380516390 Changelog: add missing separator
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2013-03-04 21:38:33 +01:00
Davide Madrisan
5dd0d6bdc1 config: 'source0' files can start by 'git://'
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2013-03-01 22:40:12 +01:00
01e754b9c4 templates/web: new template for web application packages 2013-02-21 12:44:23 +01:00
Davide Madrisan
88242edea8 spec-create: fix version detection of tarballs created via a git clone command
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2013-02-17 15:48:41 +01:00
ef3b9277ae spec-create: fix regexp to detect names starting with 'lib' (sample failing case: lilv) 2013-01-31 06:20:06 +01:00
636e7f8495 libspec.lib: also support "=" relation when assigning SPEC_OBSOLETES. 2013-01-19 18:22:52 +01:00
644f634393 libspec.lib: reworked sed expressions to get SPEC_SOURCE0_PCKNAME from SPEC_SOURCE0 2013-01-07 13:55:01 +01:00
Davide Madrisan
76440538a6 ChangeLog: sync with git commits
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2013-01-06 23:39:42 +01:00
Davide Madrisan
2e20dab6ef libspec.lib: fix initialization of SPEC_SOURCE0 and SPEC_SOURCE0_VERBATIM
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2013-01-06 23:24:56 +01:00
26f2b6a93d pck-update: restore support for passing user parameters to rpm
This was apparently broken in commit 58edaf3373589aaa8c13aa1d1b85b761e2c4e259:
libspec: new function 'specfile.check_syntax()'
2013-01-04 16:56:05 +01:00
9c934b546d libapse.lib: fix and simplify update check at sourceforge.net 2013-01-03 14:45:37 +01:00
Davide Madrisan
0fa42ac965 Release 1.16.2
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-12-21 22:15:10 +01:00
Davide Madrisan
0ca72ced3b Update documentation files
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-12-18 21:50:43 +01:00
Davide Madrisan
45b271e4c9 libspec.lib: better separation of the autospec and rpm output when reporting a syntax error of a specfile
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-12-09 20:44:31 +01:00
Davide Madrisan
3c4d5b7880 libspec.lib: better error reporting when the specfile has syntax errors
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-12-09 18:05:40 +01:00
Davide Madrisan
a176e54cee libspec.lib: specfile.check_syntax(): modify the error message
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-12-09 00:38:21 +01:00
Davide Madrisan
b65b2a0b87 libmsgmng.lib: translate "ERROR", "WARNING", and "DEBUG"
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-12-09 00:12:57 +01:00
Davide Madrisan
ee9a2c72b2 libspec: 'rpm -q --specfile --specedit <specfile>' does not always exit with an error code when the specfiles have syntax errors. Try to catch these problems.
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-12-08 23:59:53 +01:00
Davide Madrisan
58edaf3373 libspec: new function 'specfile.check_syntax()'
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-12-08 23:32:54 +01:00
Davide Madrisan
d5d2308272 ChangeLog: update
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-12-02 19:04:19 +01:00
Davide Madrisan
a2aa49e5a0 Release 1.16.1
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-12-02 17:48:00 +01:00
Davide Madrisan
34f0bd9b6d Update NEWS and autospec.spec
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-12-01 23:17:44 +01:00
Davide Madrisan
40a6110422 libraries, autospec: refactoring library loading to fix some issues
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-12-01 22:50:46 +01:00
Davide Madrisan
868c8b882a libs,tests: add a debug message saying that the file is being loaded
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-12-01 17:54:46 +01:00
Davide Madrisan
61b0a67504 libapse.lib.: do not use the real paths of libspe.lib. Use @libdir@ instead
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-12-01 17:45:50 +01:00
Davide Madrisan
8cd4f03cb4 libraries: get rid of the clashing variables 'me'
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-12-01 17:40:21 +01:00
Davide Madrisan
88ce40667b config-getvar: update the help message
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-11-30 22:24:51 +01:00
Davide Madrisan
55b61eebb1 libapse.lib: use libtranslate.lib
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-11-30 22:12:32 +01:00
Davide Madrisan
6b8099f31d libtranslate.lib: new library
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-11-30 22:02:42 +01:00
Davide Madrisan
6a8aa06630 Makefile.env: remove the variables PO_COPYRIGH_HOLDER and PO_BUGS_ADDRESS
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-11-29 22:48:34 +01:00
Davide Madrisan
0c66ce02ca po/it/Makefile: better output messages
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-11-27 23:42:25 +01:00
Davide Madrisan
8749270267 po/it/autospec.po: add a missing translation
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-11-27 21:10:51 +01:00
Davide Madrisan
b5a9663cf5 po/it/Makefile: check 'autospec.po' for untranslated strings
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-11-27 19:21:10 +01:00
Davide Madrisan
2b2f777819 Release 1.16.0
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-11-26 22:46:15 +01:00
Davide Madrisan
c81a23c5cf Update package documentation: italian manpage
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-11-26 22:34:38 +01:00
Davide Madrisan
485cb6a81d Update package documentation: NEWS
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-11-26 22:24:25 +01:00
Davide Madrisan
29e18765b6 autospec, plugins: rework the logic of the command-line options parser
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-11-25 23:21:06 +01:00
Davide Madrisan
eb0f465be0 Makefile: fix for make's target 'dist-rpm-install'
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-11-25 17:16:42 +01:00
Davide Madrisan
68c1f2b47a po/it/Makefile: minor fixes
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-11-25 16:39:12 +01:00
Davide Madrisan
288d828aaa translation framework: xgettext is buggy: use 'bash --dump-po-strings' instead and rework all the code
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-11-25 15:54:34 +01:00
Davide Madrisan
0e93767db4 plugins: do not ignore the 'color_scheme' set in the configuration files
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-11-24 00:11:27 +01:00
Davide Madrisan
5a00359a29 Point to the translation file autospec-all in all modules and libraries
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-11-23 23:45:02 +01:00
Davide Madrisan
bf480b6358 update translation framework - second stage
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-11-23 23:17:17 +01:00
Davide Madrisan
962a8d7f82 update translation framework
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-11-22 22:40:21 +01:00
Davide Madrisan
13c66cf193 pck-update: do not ignore the option '--changelog' when the variable 'changelog_userdef' is defined in one of the configuration files
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-11-20 22:34:57 +01:00
Davide Madrisan
5774796d00 Makefile.env, Makefile's: add some variables to Makefiles.env and use them in the make targets 'pot-files'
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-11-19 23:30:22 +01:00
Davide Madrisan
b1d7033d1e Update ChangeLog file
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-11-19 22:59:30 +01:00
Davide Madrisan
f525086f8b Makefile: new target 'pot-files'
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-11-19 22:45:31 +01:00
cd9d62f95b conf/03-apse.conf: fix sed expression not to match trailing spaces in:
. http://directory.fsf.org
     . http://launchpad.net
2012-11-19 15:23:57 +01:00
Davide Madrisan
796b24e1e0 Makefile: target 'check': also check library files
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-11-18 23:07:55 +01:00
73 changed files with 3877 additions and 2812 deletions

404
ChangeLog
View File

@ -1,3 +1,407 @@
Changes in version 1.16.8
--- --- -- 2020 Silvan Calarco <silvan.calarco(a)mambasoft.it>
+ improvement
* dnf install support in default configuration
-------------------------------------------------------------------------------
Changes in version 1.16.7
--- --- -- 2016 Madrisan <davide.madrisan(a)gmail.com>
+ improvement
* templates/kde5 - Silvan Calarco
(Not very recent) updates to template.
* conf/04-rpmbuild-format-unpackaged-filelist.conf - Silvan Calarco
moving KDE4 icons to /usr/share/icons to share them with KF5.
* conf/03-apse.conf - Silvan Calarco
use a mirror for distrowatch or they will ban your IP.
* templates/python - Davide Madrisan
Add the rpm macros required for building both Python2 and Python3 packages
with a single specfile.
+ bugfix
* lib/libnetwork.lib - Silvan Calarco
Support for git repositories which don't have '.git' in their url.
-------------------------------------------------------------------------------
Changes in version 1.16.6
Thu May 07 2015 Madrisan <davide.madrisan(a)gmail.com>
+ improvement
* lib/libspec.lib - Davide Madrisan
Accept the rpm token %global which defines macros in global context.
* templates/ghc - Davide Madrisan
Improve the template and fix some indentation issues.
* conf/color-theme.web - Silvan Calarco
Make error text bolder to be more readable on red background
* templates/kde5, plugins/{spec-create,pck-update} - Davide Madrisan
Add a basic support for the KDE Framework 5 packages.
+ bugfix
* plugins/pck-update
Stricter checks on buildreqs with explicit arch.
-------------------------------------------------------------------------------
Changes in version 1.16.5 - "End-of-year" release
Tue Dec 30 2014 Madrisan <davide.madrisan(a)gmail.com>
+ improvement
* templates/ghc - Silvan Calarco
New template for ghc modules.
+ bugfix
* templates/python - Silvan Calarco
Remove unexisting option '--single-version-externally-managed'.
* pck-update - Davide Madrisan
Fix the way 'package.generate_name()' return the package path when the
option '-p' has not been specified.
Bug reported by Silvan Calarco.
+ improvement
* pck-update - Silvan Calarco
Specify target_cpu when installing build requirements for x86_64 multiarch
support.
+ bugfix
* lib/libnetwork.lib - Silvan Calarco
.git suffix is not optional when cloning from http/https urls.
* conf/04-rpmbuild-format-unpackaged-filelist.conf - Davide Madrisan
Split the translation rules for the unpackaged files into a common block
('format_unpackaged_file_list_common') and an architecture-specific file
per supported architecture (currently 'i586' and 'x86_64').
This solves the problem of some wrongly filenames reported by autospec
when running on the x86_64 architecture.
Issue pointed out by Silvan Calarco.
* conf/04-rpmbuild-format-unpackaged-filelist.conf - Davide Madrisan
The translation rules for Python 2.7 and Python 3 have been updated
to reflect the current support for Python in openmamba.
+ improvement
* spec-create - Davide Madrisan
Create a correct %build block in the specfile generated from tarballs
that do not provide any 'configure' script but only an 'autogen,sh' one.
Feature asked by Silvan Calarco.
* spec-create - Davide Madrisan
specfile.create(): always execute 'git.create_tarball()' with the option
'--pck-version'. This way a user-provided package version will be used
instead of the default one.
Feature asked by Silvan Calarco.
* lib/libnetwork.lib - Davide Madrisan
git.download(): document and honour the '--pck-version' when set.
+ bugfix
* pkg-update - Silvan Calarco
'--target' needs to be passed as last option to rpmbuild.
+ improvement
* pck-update - Silvan Calarco
Support for package.arch specfile build requirement.
When this form of requirement is detected it is converted to package@arch
as required by smart.
Also add comments and a FIXME about a problem with previous patch of this
+ bugfix
* tests/{test01_pkgquality,test02_pkgsecurity} - Davide Madrisan
Fix an obsolete and now unsupported syntax for 'find -perm'.
+ improvement
* lib/libnetwork.lib - Davide Madrisan
Do not use the external tool 'which'. Use the bash builtin command 'type'.
-------------------------------------------------------------------------------
Changes in version 1.16.4 - "Korbielow" release
Fri Nov 08 2013 Madrisan <davide.madrisan(a)gmail.com>
+ bugfix
* lib/libtest.lib - Davide Madrisan:
Replace 'notify --error' by 'notify.error'.
* tests/test01_pkgquality - Davide Madrisan:
Test for bad BuildArch tags: modify regexp to catch OCaml library files.
* tests/test01_pkgquality - Davide Madrisan:
Check for wrong file attributes in bin and lib directories:
Do ignore files with name matching '*.so.owner'. These are text files
used by OCaml.
+ update
* conf/02-specfile-rpm-groups.conf - Davide Madrisan:
Add specific rpm groups for OCaml libraries and development packages.
+ improvement
* templates/ocaml-libs, templates/Makefile - Davide Madrisan:
New autospec template for OCaml libraries.
* plugins/spec-create - Davide Madrisan:
Add support for the new template ocaml-libs.
* conf/02-specfile-rpm-macros-ocaml.conf - Davide Madrisan:
New configuration file for the OCaml (library) modules.
+ update
* po/it/pck-update.po - Davide Madrisan:
Update the italian translation strings.
* italian manpage - Davide Madrisan:
Document the new template ocaml-libs.
* test00_specsyntax - Davide Madrisan:
Remove the test about the provided infopages because it's a duplicate of
the test implemented in 'test01_pkgquality'.
+ improvement
* test01_pkgquality - Davide Madrisan:
Improve the test for not or badly installed infopages and make a better
help message.
+ bugfix
* pck-update - Silvan Calarco:
Don't clone from git repository at every build is source with current
version already exists.
* pck-update - Silvan Calarco:
Fix update of git urls starting with and https://
Source URLs from git don't just end with '.git', btw they can be detected
by searching for '.git/'.
* lib/libnetwork.lib - Silvan Calarco:
Fix necessary and tested with code.google.com
Additionally print full 'git clone ..' command line used in debug output.
+ improvement
* pck-update - Davide Madrisan:
New function 'package.generate_name()' required for removing duplicated
code and fix a long standing issue.
* pck-update, spec-create - Silvan Calarco:
New options '--packager-fullname' and '--packager-email'.
+ bugfix
* po/it/autospec.po - Davide Madrisan:
Add missing translation strings.
+ update
* autospec, pck-update - Davide Madrisan:
Update the copyleft messages.
* italian manpage - Davide Madrisan:
Update the italian manpage by documenting the new '--packager-fullname'
and '--packager-email' options.
+ bugfix
* pck_update - Silvan Calarco
More changes on 'rpmbuildopt' parameters ordering to workaround cross-arch
builds. This is still a workaround to allow cross-arch builds with long rpm
command lines because it seems that rpmbuild is ignoring extra passed
parameters when they exceed a certain number (5 or 6 as far as I remember).
* pck-update - Silvan Calarco
'buildreqs_to_install': keep conservative classic behaviour on archs
different from x86_64.
* pck-update - Silvan Calarco
Fix duplicated names in 'BuildRequires' in multiarch systems (x86_64).
* pck-update - Davide Madrisan
Always rebuild srpm when rpms are built unless --nosrpm is passed.
* pck-update - Davide Madrisan
Fix the way 'package.generate_name()' return the package path.
Bug reported by Silvan Calarco.
-------------------------------------------------------------------------------
Changes in version 1.16.3
Mon Mar 04 2013 Madrisan <davide.madrisan(a)gmail.com>
+ bugfix
* lib/libapse.lib - Silvan Calarco:
Fix and simplify update check at sourceforge.net.
* pck-update - Silvan Calarco:
Restore support for passing user parameters to rpm.
Bug introduced in version 1.16.2 while creating 'specfile.check_syntax()'.
* lib/libspec.lib - Davide Madrisan:
Fix initialization of SPEC_SOURCE0 and SPEC_SOURCE0_VERBATIM.
* lib/libspec.lib - Silvan Calarco:
Reworked sed expressions to get SPEC_SOURCE0_PCKNAME from SPEC_SOURCE0.
* lib/libspec.lib - Silvan Calarco:
Also support "=" relation when assigning SPEC_OBSOLETES.
* plugins/spec-create - Silvan Calarco:
Fix regexp to detect names starting with 'lib' (sample failing case: lilv)
* plugins/spec-create - Davide Madrisan:
Fix package version detection of source tarballs that have been created by
'git.create_tarball'.
+ improvement
* templates/web - Silvan Calarco:
New template for web application packages.
+ bugfix
* conf/02-specfile-formatting-rules.conf - Davide Madrisan:
Do not warn if a 'source0' file URL begins by 'git://'.
+ update
* pck-create, italian manpage - Davide Madrisan:
Update the help message and the italian manpage by documenting the new
target 'web'.
* po/it/pck-update.po - Davide Madrisan:
Update the italian translation strings.
-------------------------------------------------------------------------------
Changes in version 1.16.2 - Christmas Release
Tue Dec 18 2012 Madrisan <davide.madrisan(a)gmail.com>
+ update
* lib/libspec.lib - Davide Madrisan:
New function 'specfile.check_syntax()' based on the code previously
located in the module pck-update (function 'infofile.create()').
+ improvement
* lib/libspec.lib - Davide Madrisan:
'rpm -q --specfile --specedit <specfile>' does not always exit with an
error code when the specfiles have syntax errors.
Try to catch these problems too.
(This problem has been pointed out by Silvan Calarco).
* lib/libmsgmng.lib - Davide Madrisan:
Translate "ERROR", "WARNING", and "DEBUG".
* lib/libspec.lib - Davide Madrisan:
Better error reporting in case of syntax errors in the specfiles.
+ update
* po/it/autospec.po - Davide Madrisan:
Update the tranlation file.
-------------------------------------------------------------------------------
Changes in version 1.16.1
Sun Dec 02 2012 Davide Madrisan <davide.madrisan(a)gmail.com>
+ improvement
* po/it/Makefile - Davide Madrisan:
Target 'locales': check 'autospec.po' for untranslated strings.
+ bugfix
* po/it/autospec.po - Davide Madrisan:
Add a missing translation.
+ update
* po/it/Makefile - Davide Madrisan:
Better output messages.
* Makefile.env - Davide Madrisan:
The variables PO_COPYRIGH_HOLDER and PO_BUGS_ADDRESS are no longer
required. Remove them.
* lib/libtranslate.lib - Davide Madrisan:
New library libtranslate.lib.
* lib/*, plugins/*, tests/* - Davide Madrisan:
Use libtranslate.lib instead of duplicate the code in every library,
plugin, and test module.
* config-getvar - Davide Madrisan:
Update the help message.
+ bugfix
* lib/* - Davide Madrisan:
Get rid of the clashing variables 'me'.
* lib/libapse.lib - Davide Madrisan:
Do not use the real paths of libspe.lib. Use @libdir@ instead.
+ update
* lib/*, tests/* - Davide Madrisan:
Add a debug message saying that the file is being loaded.
-------------------------------------------------------------------------------
Changes in version 1.16.0
Mon Nov 26 2012 Davide Madrisan <davide.madrisan(a)gmail.com>
+ update
* Makefile - Davide Madrisan:
Target 'check': also check library files.
+ bugfix
* conf/03-apse.conf - Silvan Calarco:
Fix sed expression not to match trailing spaces in:
. http://directory.fsf.org
. http://launchpad.net
+ update
* Makefiles - Davide Madrisan:
New target 'pot-files'.
* Makefiles.env, Makefile's - Davide Madrisan:
Add some variables to Makefiles.env and use them in the make targets
'pot-files'.
+ bugfix
* pck-update - Davide Madrisan:
Do not ignore the option '--changelog' when the variable
'changelog_userdef' is defined in one of the configuration files.
+ improvement
* Makefiles.env, Makefile's, po files - Davide Madrisan:
Improved translation framework.
New makefile targets: 'pot-files', 'pot-merge', and 'locales-concatenate'.
* autospec, plugins/*, lib/*, tests/* - Davide Madrisan:
Set TEXTDOMAIN to "autospec-all" (point to the global translation file
instead of using the partial ones).
* plugins/* - Davide Madrisan:
Do not load a library previously loaded by another module.
+ bugfix
* plugins/* - Davide Madrisan:
Bug introduced in version 1.14.3.
Run 'notify.enable_colors' once the configuration files are loaded.
(Problem noticed by Silvan Calarco in 'pck-update').
+ improvement
* Translation framework - Davide Madrisan:
xgettext is buggy (doesn't bump all the strings that need to be
translated) so switch to 'bash --dump-po-strings'.
Remove all the partial .po files and dinamically create a global .pot
file which will be merged to autospec.po at every build.
+ update
* autospec - Davide Madrisan:
Remove the obsolete option '-r|--colorize'.
+ bugfix
* autospec, plugins/* - Davide Madrisan:
Rework the logic of the command-line options parser to let it work in
conjunction with the late load of the configuration files.
-------------------------------------------------------------------------------
Changes in version 1.14.3
Sun Nov 18 2012 Davide Madrisan <davide.madrisan(a)gmail.com>

View File

@ -17,7 +17,6 @@
include VERSION
include Makefile.env
PACKAGE = autospec
FRONTEND = $(PACKAGE)
PACKAGE_LIB = libspec.lib
@ -64,13 +63,23 @@ all: dist-update locales check
check: dist-update
@echo "Checking libraries and scripts for syntax errors..."
@$(MAKE) check -C conf || exit 1
@$(MAKE) check -C lib || exit 1
@$(MAKE) check -C plugins || exit 1
@$(MAKE) check -C tests || exit 1
@$(MAKE) check -C tools || exit 1
dist-update: $(pck_infiles:.in=)
locales:
pot-file: dist-update
@echo "Generating po template '$(PACKAGE).pot'..."; \
/bin/bash --dump-po-strings $(PACKAGE) \
> $(srcdir)/po/$(PACKAGE)_fe.pot
@$(MAKE) pot-files -C lib || exit 1
@$(MAKE) pot-files -C plugins || exit 1
@$(MAKE) pot-files -C tests || exit 1
@$(MAKE) merge-pot-files -C po/it || exit 1
locales: pot-file
@for loc in $(LOCALES); do\
$(MAKE) -C po/$$loc || exit 1;\
done
@ -141,14 +150,6 @@ uninstall:
done
dist: clean
@for f in ChangeLog NEWS; do\
case `sed 15q $$f` in \
*"$(VERSION)"*) : ;; \
*) \
echo "$$f not updated; not releasing" 1>&2;\
exit 1;; \
esac; \
done
@rm -f history/$(dist_archive)
@$(INSTALL_DIR) history
@echo "Creating a temporary copy of the entire repository..."
@ -169,27 +170,10 @@ dist: clean
popd >/dev/null;\
rm -fr $$tmpdir
dist-rpm: dist $(PACKAGE).spec
@rpm_name=$(PACKAGE)-$(VERSION)-$(RELEASE);\
rpm_sourcedir=`rpm --eval=%{_sourcedir} 2>/dev/null`;\
rpm_specdir=`rpm --eval=%{_specdir} 2>/dev/null`;\
for d in $$rpm_sourcedir $$rpm_specdir; do\
[ -d "$$d" ] || \
{ echo "not found: $$d" 1>&2; exit 1; };\
done;\
echo "Copying $(dist_archive) to $$rpm_sourcedir...";\
(cp -p history/$(dist_archive) $$rpm_sourcedir &&\
mv -f $(PACKAGE).spec $$rpm_specdir &&\
echo "Creating rpm and srpm packages..." &&\
rpmbuild --clean -ba $$rpm_specdir/$(PACKAGE).spec) || exit 1
@echo "All done. Enjoy using $(PACKAGE)..."
dist-rpm-install: dist-rpm
@echo "Installing rpm packages..."
@rpm_pckdir=`rpm --eval=%{_rpmdir} 2>/dev/null`;\
sudo rpm -hUv --force\
$$rpm_pckdir/noarch/$(PACKAGE)-*${VERSION}-${RELEASE}.noarch.rpm\
|| exit 1
dist-rpm: dist
@rpm_sourcedir=`rpm --eval=%{_sourcedir}`;\
mv -f history/$(dist_archive) $$rpm_sourcedir;\
echo "and saved as \`$$rpm_sourcedir/$(dist_archive)'"
clean: mostlyclean
rm -f history/$(dist_archive)
@ -207,4 +191,4 @@ mostlyclean:
$(MAKE) clean -C man/$$loc || exit 1;\
$(MAKE) clean -C po/$$loc || exit 1;\
done
@rm -f po/*.pot

View File

@ -36,3 +36,4 @@ INSTALL_SCRIPT = ${INSTALL_PROGRAM}
INSTALL_DATA = ${INSTALL} -m 644
INSTALL_DIR = ${INSTALL} -d -m 755
PACKAGE = autospec

227
NEWS
View File

@ -1,3 +1,230 @@
List of user visible changes in the release 1.16.8
-- Improvement
* dnf support - Silvan Calarco
-------------------------------------------------------------------------------
List of user visible changes in the release 1.16.7
-- Improvement
* templates/kde5 - Silvan Calarco
templates/python - Davide Madrisan
Update to templates.
* conf files - Silvan Calarco
Minor improvements.
-- Bugfix
* lib/libnetwork.lib - Silvan Calarco
Support for git repositories which don't have '.git' in their url.
-------------------------------------------------------------------------------
List of user visible changes in the release 1.16.6 - "Tuscany" release
-- Improvement
* templates/kde5 - Davide Madrisan
New template for KDE Framework 5 modules.
* templates/ghc - Davide Madrisan
Improve the template and fix the indentation.
* Minor improvements - see the ChangeLog.
-- Bugfix
* plugins/pck-update - Silvan Calarco
Stricter checks on buildreqs with explicit arch.
-------------------------------------------------------------------------------
List of user visible changes in the release 1.16.5 - "End-of-year" release
-- Improvement
* templates/ghc - Silvan Calarco
New template for ghc modules.
* pck-update - Silvan Calarco
Specify target_cpu when installing build requirements for x86_64
multiarch support.
* spec-create - Davide Madrisan
Create a correct %build block in the specfile generated from tarballs
that do not provide any 'configure' script but only an 'autogen,sh' one.
Feature asked by Silvan Calarco.
* spec-create - Davide Madrisan
Honour the package version set by the user at command line when generating
a specfile from a git repository.
Feature asked by Silvan Calarco.
* pck-update - Silvan Calarco
Support for package.arch specfile build requirement.
When this form of requirement is detected it is converted to package@arch
as required by smart.
-- Bugfix
* templates/python - Silvan Calarco
Remove unexisting option '--single-version-externally-managed'.
* lib/libnetwork.lib - Silvan Calarco
.git suffix is not optional when cloning from http/https urls.
* pck-update - Davide Madrisan
Fix the way 'package.generate_name()' return the package path when called
without the option '-p'.
Bug reported by Silvan Calarco.
* conf/04-rpmbuild-format-unpackaged-filelist.conf - Davide Madrisan
The translation rules for the unpackaged files has been reworked for
supporting the x86_64 architecture.
Issue pointed out by Silvan Calarco.
* conf/04-rpmbuild-format-unpackaged-filelist.conf - Davide Madrisan
The translation rules for Python 2.7 and Python 3 have been updated.
* tests/{test01_pkgquality,test02_pkgsecurity} - Davide Madrisan
Fix an obsolete and now unsupported syntax for 'find -perm' that made some
quality and security tests fail.
-------------------------------------------------------------------------------
List of user visible changes in the release 1.16.4 - "Korbielow" release
-- Improvement
* templates/ocaml-libs, plugins/spec-create - Davide Madrisan
New autospec template for OCaml libraries.
* conf/02-specfile-rpm-groups.conf - Davide Madrisan:
Add specific rpm groups for OCaml libraries and development packages.
* conf/02-specfile-rpm-macros-ocaml.conf - Davide Madrisan:
New configuration file for the OCaml (library) modules.
* italian manpage - Davide Madrisan:
Document the new template ocaml-libs.
* pck-update, spec-create - Silvan Calarco:
New options '--packager-fullname' and '--packager-email'.
-- Bugfix
* tests/test01_pkgquality - Davide Madrisan:
Minor fixes to better support OCaml libraries.
* pck-update - Silvan Calarco
Don't clone from git repository at every build is source with current
version already exists.
* Several minor bugfixes.
-------------------------------------------------------------------------------
List of user visible changes in the release 1.16.3
-- Improvement
* templates/web - Silvan Calarco:
New template for web application packages.
-- Bugfix
* lib/libapse.lib - Silvan Calarco:
Fix and simplify update check at sourceforge.net.
* lib/libspec.lib - Davide Madrisan, Silvan Calarco:
Various fixes.
* plugins/spec-create - Davide Madrisan:
Fix package version detection of source tarballs created by cloning a git
site.
* default configuration - Davide Madrisan:
Allow URLs beginning by 'git://' in 'source0'.
-------------------------------------------------------------------------------
List of user visible changes in the release 1.16.2
-- Improvement
* lib/libspec.lib - Davide Madrisan:
Some specfiles have syntax errors that are not correctly reported by the
command 'rpm -q --specfile --specedit <specfile>'. Try to workaround this
problem. Make better error reportings.
-- Update
* lib/libspec.lib - Davide Madrisan:
New function 'specfile.check_syntax()'.
-------------------------------------------------------------------------------
List of user visible changes in the release 1.16.1
-- Improvement
* po/it/Makefile - Davide Madrisan:
Check 'autospec.po' for untranslated strings.
-- Bugfix
* po/it/autospec.po - Davide Madrisan:
Add a missing translation.
* lib/* - Davide Madrisan:
Get rid of the clashing variables 'me'. This fix soòe debug messages.
-- Update
* lib/libtranslate.lib - Davide Madrisan:
New library libtranslate.lib.
-------------------------------------------------------------------------------
List of user visible changes in the release 1.16.0
-- Improvement
* autospec, plugins, libraries, makefiles - Davide Madrisan:
The translation framework has been completely rewritten.
The partial translation files (.po)i have been removedi.
A global .pot file is now dinamically created and merged with the file
autospec.po at every build.
* lib/* - Davide Madrisan:
Do not load a library previously loaded by another module.
-- Update
* autospec - Davide Madrisan:
Remove the obsolete option '-r|--colorize'.
-- Bugfix
* Makefile - Davide Madrisan:
'check' target: also check the syntax of library files.
* conf/03-apse.conf - Silvan Calarco:
Fix sed expression not to match trailing spaces in:
. http://directory.fsf.org
. http://launchpad.net
* autospec, plugins/* - Davide Madrisan:
Rework the logic of the command-line options parser to let it work in
conjunction with the late load of the configuration files.
This fixes two bugs introduced in v1.14.3 and noticed by Silvan Calarco.)
-------------------------------------------------------------------------------
List of user visible changes in the release 1.14.3
-- Improvement

77
README.md Normal file
View File

@ -0,0 +1,77 @@
autospec suite for *openmamba GNU/Linux*
========================================
## Overview
`Autospec` is a fully configurable suite of shell scripts for automatically generating specfiles from source tarballs and
downloading, upgrading, compiling, testing, and uploading the `rpm` (*RedHat Package Manager*) packages provided by an
rpm-based Linux distribution.
Autospec was created for the `QiLinux` distribution and is now used by the [openmamba](http://www.openmamba.org) developers.
## Architecture
#### Frontend
* /usr/bin/autospec
#### Plugins (/usr/bin)
* pck-extract - Extract a given file or list of files from a srpm archive
* pck-update - Update a rpm package to a specified version and release
* spec-create - Create a specfile for the specified source tarball
* config-getvar - Print the value of a given configuration variable
#### Libraries (/usr/share/autospec/lib)
* libapse.lib - Autospec Package Search Engine library
* libcfg.lib - Load the configuration files
* libmsgmng.lib - Manage debug/warning/error messages
* libnetwork.lib - Get informations from internet repositories
* libspec.lib - Specfiles parser
* libtest.lib - Autospec library used by the test framework
* libtranslate.lib - Autospec library used to setup translations
* librepository.lib - Interact with the distribution repositories
#### Tests (/usr/share/autospec/tests)
* test00_specsyntax - Syntax checks of a specfile
* test01_pkgquality - RPM quality checks
* test02_pkgsecurity - RPM security checks
#### Templates (/usr/share/autospec/templates)
* ghc
* gnome
* kde5
* library
* ocaml-libs
* perl
* python
* standard
* standard-daemon
* web
#### Configuration files
* /etc/autospec.conf
* /etc/autospec.d/*.conf
* $HOME/.autospec
* $HOME/.autospec.d/*.conf
#### Color Scheme files
* /etc/autospec.d/color-theme.*
#### Translation files (/usr/share/locale/it/LC_MESSAGES/)
* po files
## Get it, Try it, Love it...
Install autospec in openmamba by entering the following command in the terminal prompt:
smart install autospec
or
yum install --nogpgcheck autospec
if you already switched to yum.
## Bugs
If you find a bug please create an issue in the project bug tracker at
[openmamba GitLab](https://gitlab.mambasoft.it/openmamba/autospec/issues).

View File

@ -1,2 +1,2 @@
VERSION=1.14.3
VERSION=1.35
RELEASE=1mamba

View File

@ -4,7 +4,7 @@
# +----oOO-{_}-OOo-----------------------------------------------------------+
# | |
# | $0 -- help creating rpm specfiles and automatically update rpm packages |
# | Copyright (C) 2004-2012 Davide Madrisan <davide.madrisan@gmail.com> |
# | Copyright (C) 2004-2013 Davide Madrisan <davide.madrisan@gmail.com> |
# | |
# | This program is free software; you can redistribute it and/or modify it |
# | under the terms of the GNU General Public License version 2 as published |
@ -20,11 +20,10 @@
me=(${0##*/} "@version@" "@date@")
if [[ -z "$LANG" && -r /etc/sysconfig/i18n ]]; then
. /etc/sysconfig/i18n
[ "$LANG" ] && export LANG
fi
TEXTDOMAIN="@package@_fe"; export TEXTDOMAIN
[ -r @libdir@/libtranslate.lib ] ||
{ echo "$me: "$"library not found"": @libdir@/libtranslate.lib" 1>&2
exit 1; }
. @libdir@/libtranslate.lib
# default values
let "pck_update = 0"
@ -37,7 +36,8 @@ let "print_version = 0"
function autospec.version() {
echo "\
${me[0]} ${me[1]}
Copyright (C) 2004-2012 Davide Madrisan <davide.madrisan@gmail.com>"
Copyright (C) 2004-2013 Davide Madrisan <davide.madrisan@gmail.com>
Copyright (C) 2013-2022 Silvan Calarco <silvan.calarco@mambasoft.it>"
}
function autospec.copying() {
@ -94,7 +94,7 @@ notify.disable_colors
exit 1; }
. @libdir@/libcfg.lib
# Little helper function for reading args from the commandline.
# it automatically handles -a b and -a=b variants, and returns 1 if
# we need to shift $3.
@ -116,6 +116,8 @@ function read_arg() {
}
args=()
cmdline_vars=()
while (($# > 0)); do
args[${#args[*]}]="$1"
case ${1%%=*} in
@ -131,32 +133,39 @@ while (($# > 0)); do
let "verbose = 2" ;;
-q|--quiet)
let "verbose = 0" ;;
-r|--colorize)
notify.warning $"\
deprecated option"" \`-r|--colorize': "$"use \`--colors' instead"
# for backward compatibility
selected_color_scheme="default" ;;
-h|--help)
let "print_help = 1" ;;
-V|--version)
let "print_version = 1" ;;
--colors)
read_arg selected_color_scheme "$@" ||
{ shift; args[${#args[*]}]="$1"; } ;;
read_arg color_scheme "$@" ||
{ shift; args[${#args[*]}]="$1"; }
notify.debug "color_scheme = \"$color_scheme\""
cmdline_vars[${#cmdline_vars[*]}]="color_scheme=\"$color_scheme\""
;;
-C|--config)
read_arg custom_cfgfile_list "$@" ||
{ shift; args[${#args[*]}]="$1"; } ;;
*) ;;
read_arg cfgfile_list_cmdline "$@" ||
{ shift; args[${#args[*]}]="$1"; }
notify.debug "cfgfile_list_cmdline = \"$cfgfile_list_cmdline\""
;;
*) ;;
esac
shift
done
notify.debug "[${me[0]}, "$"version"" ${me[1]}]"
[ "$selected_color_scheme" ] || color_scheme="$selected_color_scheme"
cfg_load_files "$cfgfile_list_cmdline"
notify.debug "custom_cfgfile_list = \"$custom_cfgfile_list\""
cfg_load_files "$custom_cfgfile_list"
# otherwrite the configuration variables by set them again using
# the values defined via the commanline options
for i in ${!cmdline_vars[@]}; do
notify.debug "eval \"${cmdline_vars[i]}\""
eval "${cmdline_vars[i]}"
done
[ "$logging" = "1" ] && color_scheme="none"
notify.enable_colors "$color_scheme"
case "$(( $pck_update + $spec_create + $pck_extract + $config_getvar ))" in
0) [ "$print_help" = "1" ] && autospec.usage 0
@ -172,9 +181,6 @@ case "$(( $pck_update + $spec_create + $pck_extract + $config_getvar ))" in
*) autospec.usage 1 ;;
esac
[ "$logging" = "1" ] && color_scheme="none"
notify.enable_colors "$color_scheme"
# checking for errors in the configuration file
[ "$config_getvar" = 1 ] || config.integrity

View File

@ -20,10 +20,6 @@ Requires(pre): rpm
Requires: cpio, coreutils, curl, findutils, grep, sed
Requires: /bin/mktemp
Requires: /usr/bin/getopt
%if "%{stage1}" != "1"
# host (and 'bind-utils') is not available in early stage platform development
Requires: /usr/bin/host
%endif
Requires: bzip2
Requires: gzip
Requires: unzip
@ -137,7 +133,7 @@ make install DESTDIR=%{buildroot} prefix=%{_prefix}
%defattr(-,root,root)
%{_bindir}/%{name}
%lang(it) %{_mandir}/it/man1/%{name}.*
%lang(it) %{?_localedir:%{_localedir}}%{!?_localedir:%_datadir/locale}/it/LC_MESSAGES/autospec_fe.mo
%lang(it) %{?_localedir:%{_localedir}}%{!?_localedir:%_datadir/locale}/it/LC_MESSAGES/%{name}.mo
%doc AUTHORS BUGS ChangeLog COPYING NEWS TODO
%files plugins
@ -146,10 +142,6 @@ make install DESTDIR=%{buildroot} prefix=%{_prefix}
%{_bindir}/pck-extract
%{_bindir}/pck-update
%{_bindir}/spec-create
%lang(it) %{?_localedir:%{_localedir}}%{!?_localedir:%_datadir/locale}/it/LC_MESSAGES/config-getvar.mo
%lang(it) %{?_localedir:%{_localedir}}%{!?_localedir:%_datadir/locale}/it/LC_MESSAGES/pck-extract.mo
%lang(it) %{?_localedir:%{_localedir}}%{!?_localedir:%_datadir/locale}/it/LC_MESSAGES/pck-update.mo
%lang(it) %{?_localedir:%{_localedir}}%{!?_localedir:%_datadir/locale}/it/LC_MESSAGES/spec-create.mo
%config %attr(644,root,root) %{_sysconfdir}/%{name}.conf
%files config-%{distribution}
@ -161,7 +153,6 @@ make install DESTDIR=%{buildroot} prefix=%{_prefix}
%files libs
%defattr(-,root,root)
%{_datadir}/%{name}/lib/*
%lang(it) %{?_localedir:%{_localedir}}%{!?_localedir:%_datadir/locale}/it/LC_MESSAGES/lib*.mo
%files templates-%{distribution}
%defattr(-,root,root)
@ -170,7 +161,6 @@ make install DESTDIR=%{buildroot} prefix=%{_prefix}
%files tests
%defattr(-,root,root)
%{_datadir}/%{name}/tests
%lang(it) %{?_localedir:%{_localedir}}%{!?_localedir:%_datadir/locale}/it/LC_MESSAGES/test??_*.mo
%files tools
%defattr(-,root,root)
@ -181,6 +171,45 @@ make install DESTDIR=%{buildroot} prefix=%{_prefix}
* @date@ Davide Madrisan <davide.madrisan@gmail.com> @version@-@release@
- update to @version@
* Tue Dec 30 2014 Davide Madrisan <davide.madrisan@gmail.com> 1.16.5-1mamba
- update to 1.16.5
* Fri Sep 26 2014 Silvan Calarco <silvan.calarco@mambasoft.it> 1.16.4.92-1mamba
- update to 1.16.4.92
* Thu Aug 28 2014 Silvan Calarco <silvan.calarco@mambasoft.it> 1.16.4.91-1mamba
- update to 1.16.4.91
* Wed Aug 20 2014 Silvan Calarco <silvan.calarco@mambasoft.it> 1.16.4.90-2mamba
- add patch to create archives from git using command line passed version
* Tue Aug 19 2014 Silvan Calarco <silvan.calarco@mambasoft.it> 1.16.4.90-1mamba
- update to 1.16.4.90
* Tue May 27 2014 Silvan Calarco <silvan.calarco@mambasoft.it> 1.16.4-2mamba
- apply patches to sync with current git
* Mon Nov 25 2013 Silvan Calarco <silvan.calarco@mambasoft.it> 1.16.4-1mamba
- update to 1.16.4
* Sun Nov 17 2013 Silvan Calarco <silvan.calarco@mambasoft.it> 1.16.3.90-1mamba
- update to 1.16.3.90
* Sat Jul 13 2013 Silvan Calarco <silvan.calarco@mambasoft.it> 1.16.3.20130713git-1mamba
- update to 1.16.3.20130713git
* Mon Mar 04 2013 Davide Madrisan <davide.madrisan@gmail.com> 1.16.3-1mamba
- update to 1.16.3
* Sun Dec 02 2012 Davide Madrisan <davide.madrisan@gmail.com> 1.16.1-1mamba
- update to 1.16.1
* Mon Nov 26 2012 Davide Madrisan <davide.madrisan@gmail.com> 1.16.0-1mamba
- update to 1.16.0
* Sun Nov 18 2012 Davide Madrisan <davide.madrisan@gmail.com> 1.14.3-1mamba
- update to 1.14.3
* Mon Nov 12 2012 Davide Madrisan <davide.madrisan@gmail.com> 1.14.2-1mamba
- update to 1.14.2

View File

@ -11,19 +11,19 @@ ftp_alias[1]="contrib"
ftp_enable[0]=1
ftp_enable[1]=1
# FTP path of RPMS packages (i.e. "ftp://ftp.qilinux.it/pub/QiLinux/devel/RPMS")
# FTP path of RPMS packages (i.e. "ftp://ftp.openmamba.org/pub/openmamba/devel/RPMS")
# note: you can specify multiple choices: ftpurl_ro_rpms[0] .. ftpurl_ro_rpms[n]
ftpurl_ro_rpms[0]="http://www.openmamba.org/pub/openmamba/devel/RPMS.@arch@"
ftpurl_ro_rpms[1]="http://www.openmamba.org/pub/openmamba/devel-contrib/RPMS.@arch@"
# FTP path of SRPMS packages (i.e. "ftp://ftp.qilinux.it/pub/QiLinux/devel/SRPMS")
# FTP path of SRPMS packages (i.e. "ftp://ftp.openmamba.org/pub/openmamba/devel/SRPMS")
# note: you can specify multiple choices: ftpurl_ro_srpms[0] .. ftpurl_ro_srpms[n]
ftpurl_ro_srpms[0]="http://www.openmamba.org/pub/openmamba/devel/SRPMS.base"
ftpurl_ro_srpms[1]="http://www.openmamba.org/pub/openmamba/devel-contrib/SRPMS.base"
# FTP setup data needed when uploading RPMS and SRPMS packages
# - ftp_rw_server : name of the ftp server where package will be uploaded
# (i.e. "ftpcontrib.qilinux.it" or "ftp.qilinux.it")
# (i.e. "ftpcontrib.openmamba.org" or "ftp.openmamba.org")
# - ftp_rw_user : username to gain write access to ftp server, if any
# - ftp_rw_passwd : password to gain write access to ftp server, if any
# - ftp_rw_port : ftp port (set if a non standard ftp port is used)
@ -62,7 +62,7 @@ ftpdir_rw_old[0]=""
ftpdir_rw_old[1]=""
# list of all supported architectures (note: 'noarch' is *not* a valid arch)
arch_list[0]="i586 ppc arm x86_64"
arch_list[0]="i586 arm x86_64 aarch64"
arch_list[1]="i586"
# where to upload noarch packages

View File

@ -49,7 +49,7 @@ Open\ Font\ License\ 1.1
Open\ Group\ Test\ Suite\ License
Open\ Software\ License\ 3.0
PHP\ License
Python
Python
Python\ Software\ Foundation\ License
QPL
RealNetworks\ Public\ Source\ License\ 1.0
@ -68,4 +68,112 @@ zlib/libpng
Zope\ Public\ License
OSI\ Approved
no\ OSI\ Approved
AFL-3.0
APL-1.0
Apache-2.0
Apache-1.1
APSL-2.0
Artistic-1.0-Perl
Artistic-1.0
Artistic-2.0
AAL
BSL-1.0
BSD-2-Clause-Patent
CECILL-2.1
CERN-OHL-P-2.0
CERN-OHL-S-2.0
CERN-OHL-W-2.0
CDDL-1.0
CPAL-1.0
CPL-1.0
CATOSL-1.1
CAL-1.0
CUA-OPL-1.0
EPL-1.0
EPL-2.0
eCos-2.0
ECL-1.0
ECL-2.0
EFL-1.0
EFL-2.0
Entessa
EUDatagrid
EUPL-1.2
Fair
Frameworx-1.0
AGPL-3.0-only
GPL-2.0
GPL-3.0-only
LGPL-2.1
LGPL-3.0-only
LGPL-2.0-only
HPND
IPL-1.0
Intel
IPA
ISC
Jam
LPPL-1.3c
BSD-3-Clause-LBNL
LiLiQ-P-1.1
LiLiQ-Rplus-1.1
LiLiQ-R-1.1
LPL-1.02
LPL-1.0
MS-PL
MS-RL
MirOS
MIT-0
Motosoto
MPL-1.1
MPL-2.0
MPL-1.0
MulanPSL-2.0
Multics
NASA-1.3
Naumen
NOKIA
NPOSL-3.0
NTP
OGTSL
OLFL-1.3
OSL-2.1
OSL-1.0
OLDAP-2.8
OSET-PL-2.1
PHP-3.0
PHP-3.01
PSF-2.0
RPSL-1.0
RPL-1.5
RPL-1.1
OFL-1.1
SimPL-2.0
SISSL
SPL-1.0
BSD-2-Clause
BSD-3-Clause
CNRI-Python
EUPL-1.1
MIT
NGPL
OSL-3.0
PostgreSQL
QPL-1.0
RSCPL
Sleepycat
Watcom-1.0
UPL-1.0
NCSA
Unlicense
VSL-0.1
W3C-20150513
wxWindows
Xnet
Zlib
Unicode-DFS-2015
UCL-1.0
0BSD
ZPL-2.0
ZPL-2.1
)

View File

@ -12,8 +12,8 @@ library_name_structure=""
patch_name_structure="^%\{name\}-[0-9][\.0-9a-z]*-[a-zA-Z0-9_-]+*.patch[\.gzb2]*"
# Structure for the 'Source'/'Source0' id
# Default value: "\(http\|ftp\):\/\/.*\.\(tar\.gz\|tgz\|tar\.bz2\|tar\.Z\|shar\.gz\|zip\)"
# Default value: "\(https\|http\|ftp\):\/\/.*\.\(tar\.gz\|tgz\|tar\.bz2\|tar\.Z\|shar\.gz\|zip\)"
# that is a full internet address of a tarball package compressed with
# either gzip or bzip2
# If you don't want to fix a structure use ""
source0_name_structure="\(http\|ftp\):\/\/.*\.\(tar\.gz\|tgz\|tar\.bz2\|tar\.Z\|tar\.xz\|shar\.gz\|zip\)"
source0_name_structure="\(https\|http\|ftp\|git\):\/\/.*\.\(tar\.gz\|tgz\|tar\.bz2\|tar\.Z\|tar\.xz\|shar\.gz\|zip\)"

View File

@ -36,6 +36,7 @@ Development/Kernel
Development/Languages
Development/Libraries
Development/Libraries/Java
Development/Libraries/OCaml
Development/Libraries/Perl
Development/Libraries/Python
Development/Tools
@ -85,9 +86,11 @@ System/Hardware
System/Internationalization
System/Libraries
System/Libraries/Java
System/Libraries/OCaml
System/Libraries/Perl
System/Libraries/PHP
System/Libraries/Python
System/Libraries/Ruby
System/Management
System/Multimedia
System/Servers

View File

@ -1,3 +1,2 @@
## macros used to automatically build debug packages --------------------------
rpm_macro_debug_package="%debug_package"
rpm_macro_debug_package_suffix="debug"

View File

@ -0,0 +1,5 @@
## Macros for ghc packages --------------------------------------------------
# Force a name structure for ghc packages
# Set to "" if you don't want to fix a structure
ocaml_module_name_structure="^ghc-"

View File

@ -0,0 +1,5 @@
## Macros for OCaml packages --------------------------------------------------
# Force a name structure for OCaml packages
# Set to "" if you don't want to fix a structure
ocaml_module_name_structure="^ocaml-"

View File

@ -3,69 +3,75 @@
apse_enabled[0]=1
apse_site_name[0]="source0"
apse_enabled[1]=1
apse_site_name[1]="http://sourceforge.net"
apse_enabled[1]=0
apse_site_name[1]="https://sourceforge.net"
apse_enabled[2]=1
apse_site_name[2]="http://fileforum.betanews.com"
apse_uri[2]="http://fileforum.betanews.com/search?search_advanced=Search+Fileforum&os%5B%5D=12&alphabeta=R&title="
apse_put_fields[2]=""
apse_error_msg[2]="No releases "
apse_grep[2]=""
apse_sed[2]="s,.*<p><a href=\"http://fileforum.betanews.com/detail/[^ ]*>\${search_name}[^<]*[ ]\([^ <]*\)</a></p>.*,\1,pi"
apse_site_name[2]="https://repology.org"
apse_uri[2]="https://repology.org/api/v1/projects/\${search_name}/"
apse_error_msg[2]="Not found"
apse_jq[2]="try [.\"\${search_name}\"[] | select(.status | contains(\"newest\"))][0] |.version"
apse_enabled[3]=1
apse_site_name[3]="http://linux.softpedia.com"
apse_uri[3]="http://linux.softpedia.com/progFinder"
apse_put_fields[3]="search_term="
apse_error_msg[3]="No results "
apse_grep[3]="<h2><a[^<]*\${search_name}[^a-zA-Z]"
apse_sed[3]="s,.*<h2><a[^<]*\${search_name}[^<]*[ ]\([^ <]*\)</a>.*,\1,pi"
#apse_enabled[2]=0
#apse_site_name[2]="http://fileforum.betanews.com"
#apse_uri[2]="http://fileforum.betanews.com/search?search_advanced=Search+Fileforum&os%5B%5D=12&alphabeta=R&title="
#apse_put_fields[2]=""
#apse_error_msg[2]="No releases "
#apse_grep[2]=""
#apse_sed[2]="s,.*<p><a href=\"http://fileforum.betanews.com/detail/[^ ]*>\${search_name}[^<]*[ ]\([^ <]*\)</a></p>.*,\1,pi"
apse_enabled[4]=1
apse_site_name[4]="http://gnomefiles.org"
apse_uri[4]="http://gnomefiles.org/content/search.php"
apse_put_fields[4]="search=Search&text="
apse_error_msg[4]="No entries\. "
apse_grep[4]=""
apse_sed[4]="s,.*\${search_name}</span></a></h1>&nbsp;\([^&]*\)&nbsp;<.*,\1,pi"
#apse_enabled[3]=0
#apse_site_name[3]="http://linux.softpedia.com"
#apse_uri[3]="http://linux.softpedia.com/progFinder"
#apse_put_fields[3]="search_term="
#apse_error_msg[3]="No results "
#apse_grep[3]="<h2><a[^<]*\${search_name}[^a-zA-Z]"
#apse_sed[3]="s,.*<h2><a[^<]*\${search_name}[^<]*[ ]\([^ <]*\)</a>.*,\1,pi"
apse_enabled[5]=1
apse_site_name[5]="http://freecode.com"
apse_uri[5]="http://freecode.com/projects/"
apse_put_fields[5]=""
apse_error_msg[5]="404 Not Found"
apse_grep[5]="/releases/"
apse_sed[5]="s,.*<a href=\"/projects/\${search_name}/releases/[0-9]*\">\([^ <]*\)</a>.*,\1,pi"
#apse_enabled[4]=0
#apse_site_name[4]="http://gnomefiles.org"
#apse_uri[4]="http://gnomefiles.org/content/search.php"
#apse_put_fields[4]="search=Search&text="
#apse_error_msg[4]="No entries\. "
#apse_grep[4]=""
#apse_sed[4]="s,.*\${search_name}</span></a></h1>&nbsp;\([^&]*\)&nbsp;<.*,\1,pi"
apse_enabled[6]=1
apse_site_name[6]="http://sourcewell.berlios.de"
apse_uri[6]="http://sourcewell.berlios.de/appsearch.php?by=Importance&search="
apse_put_fields[6]=""
apse_error_msg[6]="No Application found"
apse_grep[6]="appbyid.*\${search_name}[^a-zA-Z].*Stable"
apse_sed[6]="s,.*<a href=\"appbyid.*\">\${search_name} \([^ <]*\)</a>.*,\1,pi"
#apse_enabled[5]=0
#apse_site_name[5]="http://freecode.com"
#apse_uri[5]="http://freecode.com/projects/"
#apse_put_fields[5]=""
#apse_error_msg[5]="404 Not Found"
#apse_grep[5]="/releases/"
#apse_sed[5]="s,.*<a href=\"/projects/\${search_name}/releases/[0-9]*\">\([^ <]*\)</a>.*,\1,pi"
apse_enabled[7]=1
apse_site_name[7]="http://distrowatch.com"
apse_uri[7]="http://distrowatch.com/packages.php?"
apse_put_fields[7]=""
apse_error_msg[7]="is currently being redesigned"
apse_grep[7]="td.*/\${search_name}[-_][0-9]"
apse_sed[7]="s,.*td><[^>]*>\([^ <]*\)<.*,\1,pi"
#apse_enabled[6]=0
#apse_site_name[6]="http://sourcewell.berlios.de"
#apse_uri[6]="http://sourcewell.berlios.de/appsearch.php?by=Importance&search="
#apse_put_fields[6]=""
#apse_error_msg[6]="No Application found"
#apse_grep[6]="appbyid.*\${search_name}[^a-zA-Z].*Stable"
#apse_sed[6]="s,.*<a href=\"appbyid.*\">\${search_name} \([^ <]*\)</a>.*,\1,pi"
apse_enabled[8]=1
apse_site_name[8]="http://directory.fsf.org"
apse_uri[8]="http://directory.fsf.org/wiki/"
apse_put_fields[8]=""
apse_error_msg[8]="is currently no text"
apse_grep[8]=""
apse_sed[8]="s,^version \([^ ]*\),\1,pi"
#apse_enabled[7]=0
#apse_site_name[7]="http://distrowatch.gds.tuwien.ac.at"
#apse_uri[7]="http://distrowatch.gds.tuwien.ac.at/packages.php?"
#apse_put_fields[7]=""
#apse_error_msg[7]="is currently being redesigned"
#apse_grep[7]="td.*/\${search_name}[-_][0-9]"
#apse_sed[7]="s,.*td><[^>]*>\([^ <]*\)<.*,\1,pi"
apse_enabled[9]=1
apse_site_name[9]="http://launchpad.net"
apse_uri[9]="http://launchpad.net/"
apse_put_fields[9]=""
apse_error_msg[9]="page does not exist"
apse_grep[9]=""
apse_sed[9]="s,.*Latest version is \([^ ]*\),\1,pi"
#apse_enabled[8]=0
#apse_site_name[8]="http://directory.fsf.org"
#apse_uri[8]="http://directory.fsf.org/wiki/"
#apse_put_fields[8]=""
#apse_error_msg[8]="is currently no text"
#apse_grep[8]=""
#apse_sed[8]="s,^version \([^ ]*\).*,\1,pi"
#apse_enabled[9]=0
#apse_site_name[9]="http://launchpad.net"
#apse_uri[9]="http://launchpad.net/"
#apse_put_fields[9]=""
#apse_error_msg[9]="page does not exist"
#apse_grep[9]=""
#apse_sed[9]="s,.*Latest version is \([^ ]*\).*,\1,pi"

View File

@ -1,47 +1,135 @@
## unpackaged file list conversion --------------------------------------------
## conversion rules for unpackaged files
format_unpackaged_file_list="\
# translations for python packages
s,^/usr/lib/python2.6/site-packages,%{python_sitearch},
format_unpackaged_file_list_common="\
# java
s,^/usr/share/java,%{_javadir},
# xdg
s,^/usr/share/metainfo,%{_metainfodir},
# qt5
s,^/usr/include/qt5,%{_qt5_headerdir},
s,^/usr/share/doc/qt5,%{_qt5_docdir},
# qt6
s,^/usr/include/qt6,%{_qt6_headerdir},
s,^/usr/share/doc/qt6,%{_qt6_docdir},
# kde5
s,^/usr/include/KF5,%{_kde5_includedir},
s,^/usr/share/kf5,%{_kde5_datadir}/kf5,
s,^/usr/share/kservicetypes5,%{_kde5_servicetypesdir},
# kf6
s,^/usr/include/KF6,%{_kf6_includedir},
s,^/usr/share/kf6,%{_kf6_datadir}/kf6,
# systemd
s,^/usr/lib/systemd/system,%{_unitdir},
s,^/usr/lib/systemd/user,%{_userunitdir},
s,^/usr/lib/systemd/system-preset,%{_presetdir},
s,^/usr/lib/systemd/user-preset,%{_userpresetdir},
s,^/usr/lib/systemd,%{_systemd_util_dir},
s,^/usr/lib/udev/hwdb.d,%{_udevhwdbdir},
s,^/usr/lib/udev/rules.d,%{_udevrulesdir},
s,^/usr/lib/systemd/catalog,%{_journalcatalogdir},
s,^/usr/lib/binfmt.d,%{_binfmtdir},
s,^/usr/lib/sysctl.d,%{_sysctldir},
s,^/usr/lib/sysusers.d,%{_sysusersdir},
s,^/usr/lib/tmpfiles.d,%{_tmpfilesdir},
s,^/usr/share/user-tmpfiles.d,%{_user_tmpfilesdir},
s,^/usr/lib/environment.d,%{_environmentdir},
s,^/usr/lib/modules-load.d,%{_modulesloaddir},
s,^/usr/lib/modprobe.d,%{_modprobedir},
s,^/usr/lib/systemd/system-generators,%{_systemdgeneratordir},
s,^/usr/lib/systemd/user-generators,%{_systemdusergeneratordir},
s,^/usr/lib/systemd/system-environment-generators,%{_systemd_system_env_generator_dir},
s,^/usr/lib/systemd/user-environment-generators,%{_systemd_user_env_generator_dir},
# perl
s,^/usr/lib/perl[5-9]/site_perl/[0-9.]*/.*-linux-thread-multi,%{perl_sitearch},
s,^/usr/lib/perl[5-9]/site_perl/[0-9.]*,%{perl_sitelib},
s,^/usr/lib/perl[5-9]/vendor_perl/[0-9.]*/.*-linux-thread-multi,%{perl_vendorarch},
s,^/usr/lib/perl[5-9]/vendor_perl/[0-9.]*,%{perl_vendorlib},
# pam
s,^/etc/security,%{_pam_secconfdir},
s,^/etc/pam.d,%{_pam_confdir},
s,^/usr/share/pam.d,%{_pam_vendordir},
# generic translations
s,^/usr/bin,%{_bindir},
s,^/usr/sbin,%{_sbindir},
s,^/usr/libexec,%{_libexecdir},
s,^/usr/lib,%{_libdir},
s,^/usr/share/doc/,%{_docdir}/,
s,^/usr/share/info,%{_infodir},
s,^/usr/share/man,%{_mandir},
s,^/usr/share,%{_datadir},
s,^/usr/include,%{_includedir},
s,^/etc,%{_sysconfdir},
s,^/lib,/%{_lib},
s,^/lib64,/%{_lib},
s,^/var,%{_localstatedir},
# translations for kde4 packages
s,^/etc/opt/kde,%{_kde4_sysconfdir},
s,^/opt/kde/bin,%{_kde4_bindir},
s,^/opt/kde/sbin,%{_kde4_sbindir},
s,^/opt/kde/include,%{_kde4_includedir},
s,^/opt/kde/lib/kde4/libexec,%{_kde4_libexecdir},
s,^/opt/kde/lib/kde4/plugins,%{_kde4_pluginsdir},
s,^/opt/kde/lib,%{_kde4_libdir},
s,^/opt/kde/share/applications,%{_kde4_xdgappsdir},
s,^/opt/kde/share/apps/kconf_update,%{_kde4_kconfupdatedir},
s,^/opt/kde/share/apps,%{_kde4_datadir},
s,^/opt/kde/share/autostart,%{_kde4_autostartdir},
s,^/opt/kde/share/config.kcfg,%{_kde4_kcfgdir},
s,^/opt/kde/share/config,%config %{_kde4_configdir},
s,^/opt/kde/share/dbus-1/interfaces,%{_kde4_dbusinterfacesdir},
s,^/opt/kde/share/dbus-1/services,%{_kde4_dbusservicesdir},
s,^/opt/kde/share/desktop-directories,%{_kde4_xdgdirectorydir},
s,^/opt/kde/share/doc/HTML/en,%doc %lang(en) %{_kde4_htmldir}/en,
s,^/opt/kde/share/doc/HTML,%{_kde4_htmldir},
s,^/opt/kde/share/icons,%{_kde4_icondir},
s,^/opt/kde/share/kde4/services,%{_kde4_servicesdir},
s,^/opt/kde/share/kde4/servicetypes,%{_kde4_servicetypesdir},
s,^/opt/kde/share/locale,%{_kde4_localedir},
s,^/opt/kde/share/mime/packages,%{_kde4_xdgmimedir},
s,^/opt/kde/share/mimelnk,%{_kde4_mimedir},
s,^/opt/kde/share/sounds,%{_kde4_soundsdir},
s,^/opt/kde/share/templates,%{_kde4_templatesdir},
s,^/opt/kde/share/wallpapers,%{_kde4_wallpaperdir},
s,^/opt/kde/share,%{_kde4_sharedir},"
"
## conversion rules which are (target) architecture specific
### i586
format_unpackaged_file_list_i586="\
# kde5
s,^/usr/lib/cmake/KF5,%{_kde5_libdir}/cmake/KF5,
s,^/usr/lib/libKF5,%{_kde5_libdir}/libKF5,
s,^/usr/lib/qt5/mkspecs/modules/qt_K,%{_kde5_mkspecsdir}/qt_K,
# kde6
s,^/usr/lib/qt6/plugins/kf6,%{_kf6_plugindir},
# qt5
s,^/usr/lib/qt5/plugins,%{_qt5_plugindir},
s,^/usr/lib/qt5,%{_qt5_prefix},
# qt6
s,^/usr/lib/qt6/plugins,%{_qt6_plugindir},
s,^/usr/lib/qt6/qml,%{_qt6_qmldir},
s,^/usr/lib/qt6,%{_qt6_archdatadir},
# python
s,^/usr/lib/python2.7/site-packages,%{python27_sitearch},
s,^/usr/lib/python3.11/site-packages,%{python3_sitearch},
s,^/usr/lib/python3.7/site-packages,%{python37_sitearch},
s,^/usr/lib/python3.9/site-packages,%{python39_sitearch},
s,^/usr/lib/python3.10/site-packages,%{python310_sitearch},
s,^/usr/lib/python3.12/site-packages,%{python312_sitearch},
# pam
s,^/usr/lib/security,%{_pam_moduledir},
# libraries
s,^/usr/libexec,%{_libexecdir},
s,^/usr/lib,%{_libdir},
s,^/lib,/%{_lib},"
### arm
format_unpackaged_file_list_arm="$format_unpackaged_file_list_i586"
### x86_64
format_unpackaged_file_list_x86_64="\
# kde5
s,^/usr/lib64/cmake/KF5,%{_kde5_libdir}/cmake/KF5,
s,^/usr/lib64/libKF5,%{_kde5_libdir}/libKF5,
s,^/usr/lib64/qt5/mkspecs/modules/qt_K,%{_kde5_mkspecsdir}/qt_K,
# kde6
s,^/usr/lib64/qt6/plugins/kf6,%{_kf6_plugindir},
# qt5
s,^/usr/lib64/qt5/plugins,%{_qt5_plugindir},
s,^/usr/lib64/qt5,%{_qt5_prefix},
# qt6
s,^/usr/lib64/qt6/plugins,%{_qt6_plugindir},
s,^/usr/lib64/qt6/qml,%{_qt6_qmldir},
s,^/usr/lib64/qt6,%{_qt6_archdatadir},
# python
s,^/usr/lib64/python2.7/site-packages,%{python27_sitearch},
s,^/usr/lib/python2.7/site-packages,%{python27_sitelib},
s,^/usr/lib64/python3.11/site-packages,%{python3_sitearch},
s,^/usr/lib/python3.11/site-packages,%{python3_sitelib},
s,^/usr/lib64/python3.7/site-packages,%{python37_sitearch},
s,^/usr/lib/python3.7/site-packages,%{python37_sitelib},
s,^/usr/lib64/python3.9/site-packages,%{python39_sitearch},
s,^/usr/lib/python3.9/site-packages,%{python39_sitelib},
s,^/usr/lib64/python3.10/site-packages,%{python310_sitearch},
s,^/usr/lib/python3.10/site-packages,%{python310_sitelib},
s,^/usr/lib64/python3.12/site-packages,%{python312_sitearch},
s,^/usr/lib/python3.12/site-packages,%{python312_sitelib},
# pam
s,^/usr/lib64/security,%{_pam_moduledir},
# libraries
s,^/usr/libexec64,%{_libexecdir},
s,^/usr/libexec,%{_prefix}/libexec,
s,^/usr/lib64,%{_libdir},
s,^/usr/lib,%{_prefix}/lib,
s,^/lib64,/%{_lib},"
### aarch64
format_unpackaged_file_list_aarch64="$format_unpackaged_file_list_x86_64"

View File

@ -7,10 +7,12 @@
curl_opts_netlink="--connect-timeout 15 --retry 3"
# (default: "-L --remote-name --fail --progress-bar $curl_opts_netlink")
curl_options="-R -L --remote-name --fail --progress-bar $curl_opts_netlink"
# Sintax for 'proxy': "proxyhost:port"
# Syntax for 'proxy': "proxyhost:port"
proxy=""
# Sintax for 'proxy_user': "user:password"
proxy_user=""
# curl user agent
curl_user_agent="autospec/@version@ (Linux; openmamba; reports@openmamba.org)"
# Commands to run when a rpm package must be automatically installed
# (NOTE: it could be necessary to manually configure sudo
@ -21,20 +23,22 @@ proxy_user=""
# Examples:
# apt : rpm_download_and_install="sudo apt-get --quiet --yes install"
# smart: rpm_download_and_install="sudo smart install --yes"
rpm_download_and_install="sudo smart install --yes"
# yum : rpm_download_and_install="sudo yum install -y --nogpgcheck"
# dnf : rpm_download_and_install="sudo dnf install -y"
rpm_download_and_install="sudo dnf install --skip-broken -y"
rpm_install="sudo rpm -hUv"
rpm_install_force="sudo rpm -hUv --force --nodeps"
# Never install packages matching this regular expression
# - default value='' (can be for instance '-apidocs-')
rpm_install_noinstall_mask=''
# - default value='-apidocs-'
rpm_install_noinstall_mask='-apidocs-|-debug-'
# Mask that identify packages providing localization...
# - default value='-i18n-|-help-'
rpm_install_l10n_pck_mask='-i18n-|-help-'
rpm_install_l10n_pck_mask='-i18n-|-help-|-langpack-|langpacks-'
# ...and only install localization packages matching this regular expression
# - default value='.*' (can be for instance 'it|pl')
rpm_install_l10n_pck_allow_lang_mask='.*'
# - default value='en' (can be for instance 'it|pl')
rpm_install_l10n_pck_allow_lang_mask='en'
# Options passed to rpm when installing a source rpm (srpm)
# - default value='--nodeps'

View File

@ -1,4 +1,4 @@
## Allowed paths for system libraries -----------------------------------------
allowed_libdirs="\
/lib:/usr/lib:/usr/lib/qt3/lib:/usr/lib/qt4/lib:/opt/kde3/lib:/opt/kde/lib"
/lib:/usr/lib:/lib64:/usr/lib64"

View File

@ -23,6 +23,9 @@
packager_fullname=
packager_email=
## Detect rpm version
rpm_version="`rpm --version | sed 's|.* .* ||'`"
## Mode to be used when creating and updating the specfiles -------------------
rpm_specfile_mode="644"

View File

@ -2,7 +2,7 @@
# color scheme "web"
#
ESC=
CRIT="<font color=white style=\"background-color:red\">"
CRIT="<font style=\"color:white;background-color:red;font-weight:600\">"
NOTE="<font color=gold>"
WARN="<font color=red>"
EXIT="$CRIT"

View File

@ -19,8 +19,9 @@ srcdir = ..
include $(srcdir)/Makefile.env
pck_libs := libapse.lib libcfg.lib libmsgmng.lib libnetwork.lib libspec.lib \
libtest.lib README.API
libtest.lib libtranslate.lib
pck_libs_infiles := $(wildcard *.in)
pck_libs_all := $(pck_libs) README.API
all:
@ -31,16 +32,27 @@ check: $(pck_libs)
&& echo "[PASSED]" || { echo "[FAILED]"; exit 1; };\
done
install: $(pck_libs)
pot-files: $(pck_libs)
@for f in $(pck_libs); do\
echo -n "Generating po template '$$f.pot'...";\
/bin/bash --dump-po-strings $$f \
> $(srcdir)/po/$${f/.lib}.pot \
&& echo "[DONE]" || { echo "[ERROR]"; exit 1; };\
done
install: $(pck_libs_all)
@$(INSTALL_DIR) $(DESTDIR)$(libdir)
for f in $(pck_libs); do\
$(INSTALL_DATA) $${f} $(DESTDIR)$(libdir)/$${f};\
done
uninstall:
for f in $(pck_libs); do\
for f in $(pck_libs_all); do\
rm -f $(DESTDIR)$(libdir)/$${f};\
done
clean:
rm -f $(patsubst %.in,%,$(pck_libs_infiles))
@for f in $(pck_libs_all); do\
rm -f $(srcdir)/po/$$f.pot;\
done

View File

@ -1,26 +1,33 @@
#!/bin/bash
# libapse.lib -- Autospec Package Search Engine library
# Copyright (C) 2007,2012 Stefano Cotta Ramusino <stefano.cotta@openmamba.org>
# Copyright (C) 2008-2011 Silvan Calarco <silvan.calarco@mambasoft.it>
# Copyright (C) 2008-2024 Silvan Calarco <silvan.calarco@mambasoft.it>
[ "$libapse_is_loaded" = 1 ] || {
libapse_is_loaded=1
[ -z "$BASH" ] || [ ${BASH_VERSION:0:1} -lt 2 ] &&
echo $"this script requires bash version 2 or better" >&2 && exit 1
[ -r @libdir@/libmsgmng.lib ] ||
{ echo "$me: "$"library not found"": @libdir@/libmsgmng.lib" 1>&2
{ echo "\
libapse.lib: "$"library not found"": @libdir@/libmsgmng.lib" 1>&2
exit 1; }
. @libdir@/libmsgmng.lib
[ -r @libdir@/libspec.lib ] ||
{ echo "$me: "$"library not found"": /usr/share/autospec/lib/libspec.lib" 1>&2
{ echo "\
libapse.lib: "$"library not found"": @libdir@/libspec.lib" 1>&2
exit 1; }
. @libdir@/libspec.lib
if [[ -z "$LANG" && -r /etc/sysconfig/i18n ]]; then
. /etc/sysconfig/i18n
[ "$LANG" ] && export LANG
fi
TEXTDOMAIN="libapse"; export TEXTDOMAIN
[ -r @libdir@/libtranslate.lib ] ||
{ echo "\
libapse.lib: "$"library not found"": @libdir@/libtranslate.lib" 1>&2
exit 1; }
. @libdir@/libtranslate.lib
notify.debug $"loading"": \`libapse.lib'..."
# function apse.cmpversion()
# compare two version
@ -231,6 +238,7 @@ Copyright (C) 2008-2011 Silvan Calarco <silvan.calarco@mambasoft.it>""
-v, --pckurlverbatim "$"URL with no variable expansion""
-p, --proxy "$"Proxy""
-u, --proxy-user "$"Proxy user""
-o, --autoupdate-off "$"Indexes of apse sources to disable""
"$"Operation modes"":
-h, --help "$"Print this help, then exit""
@ -243,9 +251,9 @@ Copyright (C) 2008-2011 Silvan Calarco <silvan.calarco@mambasoft.it>""
}
local ARGS
ARGS=`LC_ALL=C getopt -o han:s:w:p:u: \
ARGS=`LC_ALL=C getopt -o han:s:w:p:u:o: \
--long help,allurl,pckname:,specname:,pckurl:,pckurlverbatim:,\
proxy:,proxy-user: \
proxy:,proxy-user:,autoupdate-off: \
-n "$FUNCNAME" -- "$@"`
[ $? = 0 ] || notify.error $"\
(bug)"" -- $FUNCNAME: "$"\`getopt' error"
@ -280,6 +288,10 @@ proxy:,proxy-user: \
proxy_user="$2"; shift
notify.debug "$FUNCNAME: proxy_user = \"***\""
;;
-o|--autoupdate-off)
autoupdate_off=($2); shift
notify.debug "$FUNCNAME: autoupdate_off = ($autoupdate_off)"
;;
-h|--help)
usage
${EXIT_FUNC:-"exit"}
@ -295,7 +307,7 @@ proxy:,proxy-user: \
# FIXME : should `specname' be an optional argument?
[ "$specname" ] || { usage; ${EXIT_FUNC:-"exit"} 1; }
local fcurlout=$(mktemp -q -t fcurlout.XXXXXXXX) ||
local fcurlout=$(mktemp -q -p /var/tmp -t fcurlout.XXXXXXXX) ||
notify.error $"can't create temporary files"
# SPEC_SOURCE0_PCKNAME --> src0pckname
@ -309,6 +321,12 @@ proxy:,proxy-user: \
local curr_curl_url pck_file new_version last_version
local curr_curl_proxy_opts="\
${proxy:+ --proxy $proxy}${proxy_user:+ --proxy-user $proxy_user}"
local curr_curl_user_agent_opts="\
${curl_user_agent:+ --user-agent \"$curl_user_agent\"}"
for i in `seq 1 ${#autoupdate_off[*]}`; do
apse_enabled[${autoupdate_off[$i-1]}]="0"
done
# SOURCE0 url based search (only if 'pckurl' is a valid url)
if [ "${apse_enabled[0]}" = "0" ]; then
@ -327,9 +345,9 @@ ${proxy:+ --proxy $proxy}${proxy_user:+ --proxy-user $proxy_user}"
<${NOTE}$curr_curl_url${NORM}> (\`${NOTE}source0${NORM}')..."
notify.debug "\
running: curl \$curr_curl_proxy_opts -s -L \"$curr_curl_url\""
running: curl $curr_curl_proxy_opts $curr_curl_user_agent_opts -s -L \"$curr_curl_url\""
curl $curl_opts_netlink \
$curr_curl_proxy_opts -s -L "$curr_curl_url" \
$curr_curl_proxy_opts $curr_curl_user_agent_opts -s -L "$curr_curl_url" \
> $fcurlout
let "retval = $?"
@ -426,15 +444,12 @@ sort -t. -n -r -k1 -k2 -k3 -k4 -k5 -k6 -k7 -k8 -k9 -k10 ))
notify.note $"looking at"" ${NOTE}(#1)${NORM} \
<${NOTE}${apse_site_name[1]}${NORM}>..."
local prj_name
prj_name="$specname"
[ "$prj_name" ] || notify.error $"\
(bug)"" -- $FUNCNAME: "$"assertion failed:"" \"\$prj_name\" != \"\""
[ "$src_name" ] || src_name="$specname"
curr_curl_url="http://sourceforge.net/projects/$prj_name/files/latest"
curr_curl_url="http://sourceforge.net/projects/$src_name/files/latest/download"
notify.debug \
"running: curl \$curr_curl_proxy_opts -s -L \"$curr_curl_url\""
curl $curr_curl_proxy_opts -I -A Linux -s -L "$curr_curl_url" \
"running: curl $curr_curl_proxy_opts $curr_curl_user_agent_opts -s -L \"$curr_curl_url\""
curl $curr_curl_proxy_opts $curr_curl_user_agent_opts -I -A Linux -s -L "$curr_curl_url" \
> $fcurlout
let "retval = $?"
@ -448,27 +463,16 @@ sort -t. -n -r -k1 -k2 -k3 -k4 -k5 -k6 -k7 -k8 -k9 -k10 ))
[ "$retval" = "0" ] &&
if [ "$(sed -n "s,.*Invalid Project.*,error,pi" $fcurlout)" != \
"error" ]; then
[ "$src_name" ] || src_name="$specname"
pck_file=`grep -i -m1 "Location:" $fcurlout | \
grep -i "$src_name" | \
sed -n "s,Location: \(.*\)/download,\1,pi"`
sed -n "s,Location: \(.*\)?.*,\1,pi"`
notify.debug "$FUNCNAME: pck_file = \"$pck_file\""
[ "$src_name" ] && unset src_name
new_version=`echo $pck_file | sed "s|.*/\([0-9.]*\)/.*|\1|"`
new_version=`echo $pck_file | sed "s|.*/$src_name-\([0-9]*[0-9.]*[0-9]\)[^0-9]*.*|\1|"`
[ "$new_version" = "$pck_file" ] && new_version=
[ "$new_version" ] || \
new_version=`echo $pck_file | sed -n "\
/[0-9]/!q # return nothing if no number is found in the package name
s,.*/,, # remove directory name, if any
s/\.[^0-9].*// # remove trailing stuff (.tar.gz, ...)
s|.*/\([0-9.]*\)/.*|\1|
/-[0-9]*/{s/.*-\([0-9]*.*\)/\1/p;q} # <pck_name>-<pck_ver>
/_[0-9]*/{s/.*_\([0-9]*.*\)/\1/p;q} # <pck_name>_<pck_ver>
/[^-\.][0-9]\./{s/.*[^-\.]\([0-9]\..*\)/\1/p;q} # <pck_name><pck_ver>
# <pck_name> (no version, but <pck_name> can end with numbers)
/^[^0-9]*[0-9]*$/q"`
[ "$src_name" ] && unset src_name
fi
if [ "$new_version" ]; then
@ -495,21 +499,21 @@ s|.*/\([0-9.]*\)/.*|\1|
$"looking at"" ${NOTE}(#$i)${NORM} <${NOTE}${apse_site_name[$i]}${NORM}>..."
for search_name in $src_name $specname; do
[ "${apse_put_fields[$i]}" ] &&
curr_curl_url="${apse_uri[$i]}" ||
curr_curl_url="${apse_uri[$i]}${search_name}"
[ "${apse_put_fields[$i]}" ] && curr_curl_url="${apse_uri[$i]}" || {
curr_curl_url="$(echo "${apse_uri[$i]}" | sed -e "s,\${search_name},\L${search_name},g")"
[ "${curr_curl_url}" = "${apse_uri[$i]}" ] && curr_curl_url="${apse_uri[$i]}${search_name}"
}
if [ "${apse_put_fields[$i]}" ]; then
notify.debug "\
running: curl \$curr_curl_proxy_opts -s -L -d \
running: curl $curr_curl_proxy_opts $curr_curl_user_agent_opts -s -L -d \
\"${apse_put_fields[$i]}${search_name}\" \"$curr_curl_url\""
curl $curr_curl_proxy_opts -s -L -d \
curl $curr_curl_proxy_opts $curr_curl_user_agent_opts -s -L -d \
"${apse_put_fields[$i]}${search_name}" "$curr_curl_url" \
> $fcurlout
else
notify.debug "\
running: curl \$curr_curl_proxy_opts -s -L \"$curr_curl_url\""
curl $curr_curl_proxy_opts -s -L "$curr_curl_url" > $fcurlout
running: curl $curr_curl_proxy_opts $curr_curl_user_agent_opts -s -L \"$curr_curl_url\""
curl $curr_curl_proxy_opts $curr_curl_user_agent_opts -s -L "$curr_curl_url" > $fcurlout
fi
let "retval = $?"
@ -533,6 +537,13 @@ $(echo "${apse_grep[$i]}" | sed -e "s,\${search_name},${search_name},g")"
running: grep -i -m1 \"$current_grep\" \$fcurlout | sed -n \"$current_sed\""
new_version="$(\
grep -i -m1 "$current_grep" $fcurlout | sed -n "$current_sed")"
elif [ "${apse_jq[$i]}" ]; then
current_jq="\
$(echo "${apse_jq[$i]}" | sed -e "s,\${search_name},\L${search_name},g")"
notify.debug "\
running: jq \"$current_jq\" \$fcurlout"
new_version="$(\
jq -r "$current_jq" $fcurlout)"
else
notify.debug "\
running: sed -n \"$current_sed\" \$fcurlout"
@ -563,7 +574,7 @@ apse.cmpversion \"$last_version\" \"$new_version\""
unset APSE_LAST_VERSION
if [ "$last_version" ]; then
APSE_LAST_VERSION="${last_version/-/.}"
APSE_LAST_VERSION="${last_version/-*}"
notify.note $"\
last version of \`${NOTE}$specname${NORM}' found:"" \
\`${NOTE}${APSE_LAST_VERSION}${NORM}'"
@ -590,3 +601,5 @@ a newer version of \`${NOTE}$specname${NORM}' is already installed"
return $retval
}
} # endif $libapse_is_loaded

View File

@ -2,19 +2,25 @@
# libcfg.lib -- @package@ library for loading the configuration file(s)
# Copyright (C) 2008,2011,2012 Davide Madrisan <davide.madrisan@gmail.com>
[ "$libcfg_is_loaded" = 1 ] || {
libcfg_is_loaded=1
[ -z "$BASH" ] || [ ${BASH_VERSION:0:1} -lt 2 ] &&
echo $"this script requires bash version 2 or better" >&2 && exit 1
[ -r @libdir@/libmsgmng.lib ] ||
{ echo "$me: "$"library not found"": @libdir@/libmsgmng.lib" 1>&2
{ echo "\
libcfg.lib: "$"library not found"": @libdir@/libmsgmng.lib" 1>&2
exit 1; }
. @libdir@/libmsgmng.lib
if [[ -z "$LANG" && -r /etc/sysconfig/i18n ]]; then
. /etc/sysconfig/i18n
[ "$LANG" ] && export LANG
fi
TEXTDOMAIN="libcfg"; export TEXTDOMAIN
[ -r @libdir@/libtranslate.lib ] ||
{ echo "\
libcfg.lib: "$"library not found"": @libdir@/libtranslate.lib" 1>&2
exit 1; }
. @libdir@/libtranslate.lib
notify.debug $"loading"": \`libcfg.lib'..."
# list of the configuration file(s)
default_cfg_list=(\
@ -113,7 +119,8 @@ function cfg_load_files() {
notify.error $"configuration file not found"": $1"
# select a different list of user configuration files
cfgfile_list=(\
`ls /etc/@package@.conf /etc/@package@.d/*.conf $1 2>/dev/null`)
`ls /etc/@package@.conf /etc/@package@.d/*.conf 2>/dev/null` \
`ls $1 2>/dev/null`)
else
# default configuration files
cfgfile_list=(${default_cfg_list[@]})
@ -135,3 +142,5 @@ function cfg_load_files() {
[ "$cfg_files_num" = 0 ] && notify.error $"configuration file not found"
}
} # endif $libcfg_is_loaded

View File

@ -2,19 +2,22 @@
# libmsgmng.lib -- @package@ library to manage debug/warning/error messages
# Copyright (C) 2005,2006,2008,2012 Davide Madrisan <davide.madrisan@gmail.com>
[ "$libmsgmng_is_loaded" = 1 ] || {
libmsgmng_is_loaded=1
[ -z "$BASH" ] || [ ${BASH_VERSION:0:1} -lt 2 ] &&
echo $"this script requires bash version 2 or better" >&2 && exit 1
if [[ -z "$LANG" && -r /etc/sysconfig/i18n ]]; then
. /etc/sysconfig/i18n
[ "$LANG" ] && export LANG
fi
TEXTDOMAIN="libmsgmng"; export TEXTDOMAIN
[ -r @libdir@/libtranslate.lib ] ||
{ echo "\
libmsgmng.lib: "$"library not found"": @libdir@/libtranslate.lib" 1>&2
exit 1; }
. @libdir@/libtranslate.lib
# notify family of message handling functions:
# - notify.debug
# - notify.warning
# - notify.error
# - notify.debug
# - notify.note
# args:
# $1 : message to print
@ -26,20 +29,22 @@ TEXTDOMAIN="libmsgmng"; export TEXTDOMAIN
notify_def_msg="<"$"no message"">"
function notify.debug() {
[ ${verbose:-0} -gt 1 ] || return
echo -e "${WARN}"$"DEBUG""${NORM}: ${1:-$notify_def_msg}" 1>&2
}
notify.debug $"loading"": \`libmsgmng.lib'..."
function notify.warning() {
echo -e "${WARN}WARNING${NORM}: ${1:-$notify_def_msg}" 1>&2
echo -e "${WARN}"$"WARNING""${NORM}: ${1:-$notify_def_msg}" 1>&2
}
function notify.error() {
echo -e "${EXIT}ERROR${NORM}: ${EXIT}${1:-$notify_def_msg}${NORM}" 1>&2
echo -e "${EXIT}"$"ERROR""${NORM}: ${EXIT}${1:-$notify_def_msg}${NORM}" 1>&2
${EXIT_FUNC:-"exit"} 1
}
function notify.debug() {
[ ${verbose:-0} -gt 1 ] || return
echo -e "${WARN}DEBUG${NORM}: ${1:-$notify_def_msg}" 1>&2
}
function notify.note() {
[ ${verbose:-0} -ge 0 ] || return
echo -e "${1:-$notify_def_msg}"
@ -71,3 +76,5 @@ $"unknown color theme \`$color_scheme': colors will be disabled"
function notify.disable_colors() {
ESC= CRIT= NOTE= WARN= EXIT= NORM=
}
} # endif $libmsgmng_is_loaded

View File

@ -1,47 +1,32 @@
#!/bin/bash
# libnetwork.lib -- @package@ library to get info from internet repositories
# Copyright (C) 2008,2010,2012 Davide Madrisan <davide.madrisan@gmail.com>
# Copyright (C) 2008,2010,2012,2014 Davide Madrisan <davide.madrisan@gmail.com>
[ "$libnetwork_is_loaded" = 1 ] || {
libnetwork_is_loaded=1
[ -z "$BASH" ] || [ ${BASH_VERSION:0:1} -lt 3 ] &&
{ echo $"this script requires bash version 3 or better" >&2 && exit 1; }
me=(${0##*/} "@version@" "@date@")
[ -r @libdir@/libmsgmng.lib ] ||
{ echo "$me: "$"library not found"": @libdir@/libmsgmng.lib" 1>&2
{ echo "\
libnetwork.lib: "$"library not found"": @libdir@/libmsgmng.lib" 1>&2
exit 1; }
. @libdir@/libmsgmng.lib
if [[ -z "$LANG" && -r /etc/sysconfig/i18n ]]; then
. /etc/sysconfig/i18n
[ "$LANG" ] && export LANG
fi
TEXTDOMAIN="libnetwork"; export TEXTDOMAIN
[ -r @libdir@/libtranslate.lib ] ||
{ echo "\
libnetwork.lib: "$"library not found"": @libdir@/libtranslate.lib" 1>&2
exit 1; }
. @libdir@/libtranslate.lib
notify.debug $"loading"": \`libnetwork.lib'..."
# check if all the needed tools are available
# note: 'host' has been removed from this list because the package
# bind-utils is not available in early stage platform development
for tool in curl mktemp; do
[ "$(type -p curl)" ] || notify.error $"utility not found"": \`curl'"
done
# function repository.is_reachable()
# check if the server '$1' is reachable (test = DNS lookup query)
# args:
# $1 : server name
function repository.is_reachable() {
local ftpserver="${1/[a-z]*\:\/\//}"
[ "$ftpserver" ] || notify.error $"\
(bug)"" -- $FUNCNAME: "$"missing mandatory arg"" (#1)"
if [ "$(type -p host)" ]; then
host -W3 $ftpserver >&/dev/null
else
notify.warning $"utility not found"": \`host'"
fi
return $?
}
# function repository.get_srpm_pckname_from_site()
# get the list of SRPM packages by looking at the curl dump of the
# ftp or html site
@ -94,7 +79,7 @@ function repository.get_srpm_pckname_from_site() {
notify.debug "$FUNCNAME: infile = \"$infile\""
local regexpr
[[ "$pck_name" =~ ^[a-zA-Z0-9_-]+$ ]] && \
[[ "$pck_name" =~ ^[+a-zA-Z0-9_-]+$ ]] && \
regexpr="^$pck_name-[^-]\+-[^-]\+$" || regexpr="$pck_name"
notify.debug "$FUNCNAME: regexpr = \"$regexpr\""
@ -103,6 +88,7 @@ function repository.get_srpm_pckname_from_site() {
local pckname_from_HTML=($(sed -n "\
# remove HTML tags --> get a better input
/<[aA]\+ [hH]\+[rR]\+[eE]\+[fF]\+=\".*\.src\.rpm\"/{
s|%2B|+|g;
s|.*<[aA]\+ [hH]\+[rR]\+[eE]\+[fF]\+=\"\([^\"]*\)\".*|\1|
{/$regexpr/Ip}}" $infile))
echo "${pckname_from_HTML[*]}"
@ -229,13 +215,13 @@ ${proxy:+ --proxy ***}${proxy_user:+ --proxy-user ***}"
getting list of files from"" \`${NOTE}$currurl/${NORM}'..."
case $currurl in
ftp://*|http://*) ;;
ftp://*|http://*|https://*) ;;
*) notify.warning $"unsupported query type for this protocol"
let "errors += 1"
continue ;;
esac
currflist="$(mktemp -q -t flist.XXXXXXXX)" ||
currflist="$(mktemp -q -p /var/tmp -t flist.XXXXXXXX)" ||
notify.error $"can't create temporary files"
notify.debug "$FUNCNAME: currflist = $currflist"
@ -246,7 +232,7 @@ getting list of files from"" \`${NOTE}$currurl/${NORM}'..."
notify.debug "$FUNCNAME: curl return code: $retval"
case "$retval" in
0) sed -i 's/\x0D$//' $currflist
0) sed -i 's/\x0D$//;s/%2B/+/g' $currflist
flist[$i]="$currflist" ;;
6) notify.warning $"couldn't resolve host"
let "errors += 1" ;;
@ -277,7 +263,7 @@ getting list of files from"" \`${NOTE}$currurl/${NORM}'..."
got_SPEC_FILENAME=($(\
repository.get_srpm_pckname_from_site --ftp "$pck_name" "${flist[$i]}"))
;;
http://*)
http://*|https://*)
got_SPEC_FILENAME=($(\
repository.get_srpm_pckname_from_site --html "$pck_name" "${flist[$i]}"))
;;
@ -379,7 +365,7 @@ function repository.get_RPMS_name() {
[ "$archlist" ] || notify.error $"\
(bug)"" -- $FUNCNAME: "$"no list of architectures set"" (\$archlist)"
local flist=`mktemp -q -t flist.XXXXXXXX` ||
local flist=`mktemp -q -p /var/tmp -t flist.XXXXXXXX` ||
notify.error $"can't create temporary files"
local curr_arch errors pck_name curr_match
@ -438,9 +424,9 @@ ${proxy:+ --proxy ***}${proxy_user:+ --proxy-user ***}"
esac
if [ -s "$flist" ]; then
sed -i 's/\x0D$//' $flist
sed -i 's/\x0D$//;s/%2B/+/g' $flist
case $currurl in
ftp://*|http://*)
ftp://*|http://*|https://*)
for pck_name in ${pck_names[@]}; do
got_RPM_FILENAME=( ${got_RPM_FILENAME[@]} $(\
if [ -n "$excludeopt" ]; then
@ -785,6 +771,8 @@ action:,directory:,rename-from:,rename-to:,delete:,ftp-passive \
[ "$ftp_passive" ] && options="$options $ftp_passive"
[ "${1:0:4}" == "http" ] && http_mode=1
# NOTE: see RFC959 for the sintax of the 'quote' commands
# curl --ftp-pasv --user user:password \
# -Q "MKD /devel/old/prova.dir" \
@ -794,21 +782,34 @@ action:,directory:,rename-from:,rename-to:,delete:,ftp-passive \
mkdir)
[ "$directory" ] || notify.error $"\
(bug)"" -- $FUNCNAME: "$"missing mandatory arg"" (--directory)"
notify.debug "\
curl $options --user \"***:***\" --quote \"MKD $directory\" $1"
curl $options --user "$user" --quote "MKD $directory" $1 &>/dev/null
if [ "$http_mode" == "1" ]; then
notify.debug "\
curl $options --user \"***:***\" -X MKCOL $1${directory}/"
curl $options --user "$user" -X MKCOL $1${directory}/ &>/dev/null
else
notify.debug "\
curl $options --user \"***:***\" --quote \"MKD $directory\" $1"
curl $options --user "$user" --quote "MKD $directory" $1 &>/dev/null
fi
;;
rename-file)
[ "$fromfile" ] || notify.error $"\
(bug)"" -- $FUNCNAME: "$"missing mandatory arg"" (--rename-from)"
[ "$tofile" ] || notify.error $"\
(bug)"" -- $FUNCNAME: "$"missing mandatory arg"" (--rename-to)"
notify.debug "curl $options --user \"***:***\"\
--quote \"RNFR $fromfile\" --quote \"RNTO $tofile\" $1"
curl $options --user "$user" \
--quote "RNFR $fromfile" --quote "RNTO $tofile" $1 &>/dev/null
if [ "$http_mode" == "1" ]; then
notify.debug "curl $options --user \"***:***\" -X MOVE\
--header \"Destination:$1$tofile\" $1$fromfile"
curl $options --user "$user" -X MOVE \
--header "Destination:$1$tofile" $1$fromfile &>/dev/null
else
notify.debug "curl $options --user \"***:***\"\
--quote \"RNFR $fromfile\" --quote \"RNTO $tofile\" $1"
curl $options --user "$user" \
--quote "RNFR $fromfile" --quote "RNTO $tofile" $1 &>/dev/null
fi
;;
delete)
[ "$deletefile" ] || notify.error $"\
@ -823,9 +824,15 @@ curl $options --user \"***:***\" --quote \"MKD $directory\" $1"
# curl -v --ftp-pasv --user "$user" \
# --quote "DELE SRPMS.base/filename-0.0.1-1distro.src.rpm" \
# ftp://ftpaccounts.openmamba.org
notify.debug "\
if [ "$http_mode" == "1" ]; then
notify.debug "\
curl $options --user \"***:***\" -X DELETE $1$deletefile"
curl $options --user "$user" -X DELETE $1$deletefile &>/dev/null
else
notify.debug "\
curl $options --user \"***:***\" --quote \"DELE $deletefile\" $1"
curl $options --user "$user" --quote "DELE $deletefile" $1 &>/dev/null
curl $options --user "$user" --quote "DELE $deletefile" $1 &>/dev/null
fi
;;
*) notify.error $"\
(bug)"" -- $FUNCNAME: "$"unknown action"": ($action)"
@ -848,6 +855,7 @@ curl $options --user \"***:***\" --quote \"DELE $deletefile\" $1"
# -d, --destdir : target directory
# -p, --proxy : proxy server
# -u, --proxy-user : proxy user
# --preserve-dot-git : do not remove .git files
# $@ : git repository
#
# return value:
@ -856,14 +864,15 @@ curl $options --user \"***:***\" --quote \"DELE $deletefile\" $1"
function git.download() {
local ARGS
ARGS=`LC_ALL=C getopt \
-o d:v:p:u: \
--long destdir:,pck-version:,proxy:,proxy-user: \
-o d:v:p:u:k \
--long destdir:,pck-version:,proxy:,proxy-user:,preserve-dot-git: \
-n "$FUNCNAME" -- "$@"`
[ $? = 0 ] || notify.error $"(bug)"" -- $FUNCNAME: "$"\`getopt' error"
local destdir
local proxy proxy_user
local pck_version
local preserve_dot_git=0
eval set -- "$ARGS"
while :; do
@ -884,6 +893,10 @@ function git.download() {
proxy_user="$2"; shift
notify.debug "$FUNCNAME: proxy_user = \"$proxy_user\""
;;
--preserve-dot-git)
preserve_dot_git="$2"; shift
notify.debug "$FUNCNAME: preserve_dot_git = \"$preserve_dot_git\""
;;
--) shift; break;;
*) notify.error $"\
(bug)"" -- $FUNCNAME: "$"\`getopt' error: bad command \`$1'" ;;
@ -905,21 +918,33 @@ function git.download() {
notify.debug "$FUNCNAME: token_dirname = \"$token_dirname\""
notify.debug "$FUNCNAME: token_basename = \"$token_basename\""
local git_branch="${token_dirname##*/}"
if [ -e $destdir/$token_basename ]; then
if [ "$force_download" = "0" ]; then
notify.note "[${filenum:-*}] $NOTE$token_basename$NORM ... "$"skipped"
return 0
fi
fi
local git_branch="${token_dirname/*\/}"
notify.debug "$FUNCNAME: git_branch = \"$git_branch\""
git.create_tarball \
--pck-version "$pck_version" \
--destdir "$destdir" \
--preserve-dot-git "0" --git-branch "$git_branch" \
"${token_dirname%/*}"
--preserve-dot-git "${preserve_dot_git}" --git-branch "$git_branch" \
"${token_dirname/\/$git_branch*}"
}
# function git.urldecode
# url decodes a given string
function git.urldecode() { : "${*//+/ }"; echo -e "${_//%/\\x}"; }
# function git.create_tarball
# clone a git repository and convert is into a tarball file
#
#
# args:
# -d,--destdir : target directory
# -v,--pck-version : package version
# --git-branch : git branch
# --preserve-dot-git : do not remove .git files
# $@ : git repository
@ -942,6 +967,7 @@ function git.create_tarball() {
# see: http://bardofschool.blogspot.fr/2008/11/use-git-behind-proxy.html
local proxy proxy_user
local git_branch
local git_commit
local preserve_dot_git=0
local pck_version
@ -957,8 +983,18 @@ function git.create_tarball() {
notify.debug "$FUNCNAME: pck_version = \"$pck_version\""
;;
--git-branch)
git_branch="$2"; shift
git_branch="`git.urldecode "$2"`"; shift
if [ "${git_branch/@*}" != "${git_branch}" ]; then
git_commit="${git_branch/*@}"
git_branch="${git_branch/@*}"
if [ ! "${git_commit}" ]; then
notify.error "$FUNCNAME: cannot checkout empty commit"
fi
fi
notify.debug "$FUNCNAME: git_branch = \"$git_branch\""
if [ "${git_commit}" ]; then
notify.debug "$FUNCNAME: git_commit = \"$git_commit\""
fi
;;
--preserve-dot-git)
preserve_dot_git="$2"; shift
@ -987,20 +1023,10 @@ function git.create_tarball() {
[ "$destdir" ] || notify.error $"\
(bug)"" -- $FUNCNAME: "$"missing mandatory arg"" (--destdir)"
local today="$(date "+%Y%m%d")"
if [ "$pck_version" ]; then
[ "$pck_version" = "${today}git" ] || notify.warning "\
${NOTE}${pck_version}${NORM}: "$"\
not the expected package version"" (${NOTE}${today}git${NORM})..."
else
pck_version="${today}git"
notify.debug "$FUNCNAME: pck_version = \"$pck_version\""
fi
which git &>/dev/null ||
type -p git &>/dev/null ||
notify.error $"utility not found"": \`git'"
local tmpgitdir=$(mktemp -q -d -t tmpgit.XXXXXXXX)
local tmpgitdir=$(mktemp -q -d -p /var/tmp -t tmpgit.XXXXXXXX)
[ $? -eq 0 ] ||
notify.error $"can't create temporary files"
notify.debug "$FUNCNAME: tmpgitdir = $tmpgitdir"
@ -1011,10 +1037,12 @@ not the expected package version"" (${NOTE}${today}git${NORM})..."
notify.note \
"${NOTE}"$"cloning git repository""\
<$git_repository> ${git_branch:+($git_branch)}${NORM}""..."
if [ "$preserve_dot_git" = "0" ]; then
git clone --depth=1 ${git_branch:+-b $git_branch} "$git_repository"
if [ "$preserve_dot_git" = "0" -a "${git_repository:0:4}" != "http" -a ! "${git_commit}" ]; then
notify.debug "$FUNCNAME: git clone --recursive --depth=1 ${git_branch:+-b $git_branch} \"$git_repository\""
git clone --recursive --depth=1 ${git_branch:+-b $git_branch} "$git_repository"
else
git clone ${git_branch:+-b $git_branch} "$git_repository"
notify.debug "$FUNCNAME: git clone --recursive ${git_branch:+-b $git_branch} \"$git_repository\""
git clone --recursive ${git_branch:+-b $git_branch} "$git_repository"
fi
[ $? -eq 0 ] ||
{ popd &>/dev/null
@ -1023,6 +1051,16 @@ not the expected package version"" (${NOTE}${today}git${NORM})..."
pck_tarball="$(find -mindepth 1 -maxdepth 1 -type d -printf "%f")"
if [ "${git_commit}" ]; then
cd ${pck_tarball}
git checkout ${git_commit} || {
popd &>/dev/null
rm -fr $tmpgitdir
notify.error $"cannot checkout the specified tag";
}
cd ..
fi
if [ "$preserve_dot_git" = "0" ]; then
# remove git files
rm -fr $pck_tarball/.git
@ -1062,3 +1100,5 @@ an error occurred while creating"": ${pck_tarball}.tar.bz2"
return 0
}
} # endif $libnetwork_is_loaded

View File

@ -2,19 +2,25 @@
# libspec.lib -- @package@ library to manage rpm specfiles
# Copyright (C) 2004-2010,2012 Davide Madrisan <davide.madrisan@gmail.com>
[ "$libspec_is_loaded" = 1 ] || {
libspec_is_loaded=1
[ -z "$BASH" ] || [ ${BASH_VERSION:0:1} -lt 2 ] &&
echo $"this script requires bash version 2 or better" >&2 && exit 1
[ -r @libdir@/libmsgmng.lib ] ||
{ echo "$me: "$"library not found"": @libdir@/libmsgmng.lib" 1>&2
{ echo "\
libspec.lib: "$"library not found"": @libdir@/libmsgmng.lib" 1>&2
exit 1; }
. @libdir@/libmsgmng.lib
if [[ -z "$LANG" && -r /etc/sysconfig/i18n ]]; then
. /etc/sysconfig/i18n
[ "$LANG" ] && export LANG
fi
TEXTDOMAIN="libspec"; export TEXTDOMAIN
[ -r @libdir@/libtranslate.lib ] ||
{ echo "\
libspec.lib: "$"library not found"": @libdir@/libtranslate.lib" 1>&2
exit 1; }
. @libdir@/libtranslate.lib
notify.debug $"loading"": \`libspec.lib'..."
# function boolexpr.solve
# calculate the boolean expression `$1' expanding the variables
@ -288,7 +294,7 @@ $FUNCNAME: conditional block (%end) [level#$ifexpr_level]"
%end)
notify.warning $"\`%end' found; should perhaps be \`%endif'"
;;
%define)
"%define"|"%global")
# note: we want to catch %define directives put in conditional blocks
# example: %define majversion <single_token>
let "level = 0"
@ -313,8 +319,8 @@ $FUNCNAME: conditional block (%end) [level#$ifexpr_level]"
case "${tok[*]}" in
%\(*\))
# it's something like:
# %define major_ver %(echo %version | cut -d. -f 1-2)
# %define glibver %(echo `rpm -q --queryformat '%{VERSION}' libglib`)
# %global major_ver %(echo %version | cut -d. -f 1-2)
# rpmvar_value[${#rpmvar_value[*]}]="\
#$( echo "${tok[*]}" | sed "s|%(\(.*\))|\1|" )"
@ -591,6 +597,82 @@ ${output_suffix}")
echo "$output"
}
function specfile.check_syntax() {
local ARGS
ARGS=`LC_ALL=C getopt -o s:o: \
--long specfile:,specfile-preprocessed:,rpmopts: \
-n "$FUNCNAME" -- "$@"`
[ $? = 0 ] || notify.error $"\
(bug)"" -- $FUNCNAME: "$"\`getopt' error"
eval set -- "$ARGS"
local specfile rpmbuild_opts line
local specfile_preprocessed="/dev/null"
while :; do
case "$1" in
-s|--specfile)
specfile="$2"; shift
notify.debug "$FUNCNAME: specfile = \"$specfile\""
;;
--specfile-preprocessed)
specfile_preprocessed="$2"; shift
notify.debug "\
$FUNCNAME: specfile_preprocessed = \"$specfile_preprocessed\""
;;
-o|--rpmopts)
rpm_options="$2"; shift
notify.debug "$FUNCNAME: rpm_options = \"$rpm_options\""
;;
--) shift; break ;;
*) notify.error $"\
(bug)"" -- $FUNCNAME: "$"\`getopt' error: bad command \`$1'" ;;
esac
shift
done
local tmpspreprerr=$(mktemp -q -p /var/tmp -t $me.XXXXXXXX)
[ $? -eq 0 ] ||
notify.error "$FUNCNAME: "$"can't create temporary files"
notify.debug "$FUNCNAME: tmpspreprerr = \`${NOTE}$tmpspreprerr${NORM}'"
if [ "${rpm_version:0:2}" == "5." ]; then
notify.debug "\
$FUNCNAME: running: rpm -q $rpm_options --specfile --specedit $specfile ..."
eval "\
rpm -q $rpm_options --specfile --specedit $specfile \
> $specfile_preprocessed 2> $tmpspreprerr"
else
notify.debug "\
$FUNCNAME: running: rpmspec $rpm_options -P $specfile ..."
eval "\
rpmspec $rpm_options -P $specfile \
> $specfile_preprocessed 2> $tmpspreprerr"
fi
if [ -s "$tmpspreprerr" ]; then
notify.warning $"\
the specfile has some syntax errors"" ("$"rpm output""):"
while read line; do
echo " $line"
done < $tmpspreprerr
elif [ -z "$(grep "^%changelog" $specfile_preprocessed 2>/dev/null)" ]; then
# try to catch some other syntax errors even if rpm exit with
# a zero return code and no messages are sent to stderr
# FIXME: we assume "%changelog" is the last part of the specfile
notify.warning $"the specfile has some syntax errors"":"
while read line; do
notify.warning " $line"
done < <(tail -n 3 $specfile_preprocessed)
notify.warning ">>"
notify.warning " "$"the error should be here!"
fi
rm -f $tmpspreprerr
}
# function specfile.getvars
# set the variable(s) given as argument to the value(s) found
@ -818,7 +900,8 @@ rpmvars.solve "${SPEC_PATCH[$i]}" "$specfile" | \
[ "$SPEC_SOURCE0_VERBATIM" ] ||
{ SPEC_SOURCE0_VERBATIM=$(\
sed -n "/%description/q;{
/^[ \t]*Source[0]*/{s,[ \t]*Source[0]*[ \t]*:[ \t]*,,p}}" \
/^[ \t]*\(Source\|Source0\)[ \t]*:/{
s,[ \t]*Source[0]*[ \t]*:[ \t]*,,p}}" \
$specfile)
notify.debug "\
$FUNCNAME: SPEC_SOURCE0_VERBATIM = \"$SPEC_SOURCE0_VERBATIM\""
@ -827,10 +910,10 @@ $FUNCNAME: SPEC_SOURCE0_VERBATIM = \"$SPEC_SOURCE0_VERBATIM\""
fi
[ "$SPEC_SOURCE0" ] && continue
SPEC_SOURCE0=$(sed -n "/%description/q;{
/^[ \t]*Source[0]*/{
s,[ \t]*Source[0]*[ \t]*:[ \t]*,,
p}}" $specfile)
/^[ \t]*\(Source\|Source0\)[ \t]*:/{
s,[ \t]*Source[0]*[ \t]*:[ \t]*,,p}}" $specfile)
SPEC_SOURCE0=$(rpmvars.solve "$SPEC_SOURCE0" "$specfile")
notify.debug "$FUNCNAME: $var = \"$SPEC_SOURCE0\""
;;
@ -840,26 +923,23 @@ $FUNCNAME: SPEC_SOURCE0_VERBATIM = \"$SPEC_SOURCE0_VERBATIM\""
[ "$SPEC_VERSION" ] || specfile.getvars -s "$specfile" SPEC_VERSION
[ "$SPEC_SOURCE0" ] || specfile.getvars -s "$specfile" SPEC_SOURCE0
SPEC_SOURCE0_PCKNAME=$(echo $SPEC_SOURCE0 | sed -n "\
s,%[{]*name[}]*,$SPEC_NAME,
s,%[{]*version[}]*,$SPEC_VERSION,
SPEC_SOURCE0_PCKNAME=$(echo $SPEC_SOURCE0 | sed "\
s/.*\/// # remove directory name, if any
s/\.[^0-9].*// # remove trailing stuff (.tar.gz, ...)
# <pck_name><pck_ver>
/^${SPEC_NAME}${SPEC_VERSION}$/{s,$SPEC_VERSION,,p;q}
/[^-\.][0-9]\./{s/\(.*[^-\.]\)[0-9]\..*/\1/p;q}
/^${SPEC_NAME}${SPEC_VERSION}$/{s,$SPEC_VERSION,,;q}
# <pck_name>-<pck_ver>
/^${SPEC_NAME}\-${SPEC_VERSION}$/{s,\-${SPEC_VERSION},,p;q}
/-[0-9]\+/{s/-[0-9].*//p;q}
/^.*\-${SPEC_VERSION}.*/{s,\-${SPEC_VERSION}.*,,;q}
# <pck_name>_<pck_ver>
/^${SPEC_NAME}_${SPEC_VERSION}$/{s,_${SPEC_VERSION},,p;q}
/_[0-9]\+/{s/_[0-9].*//p;q}
/^.*_${SPEC_VERSION}.*/{s,_${SPEC_VERSION}.*,,;q}
# <pck_name>.<pck_ver>
/^${SPEC_NAME}\.${SPEC_VERSION}$/{s,\.${SPEC_VERSION},,p;q}
/^[a-zA-Z0-9_]\+\.[0-9\.]\+$/{s,\(^[a-zA-Z0-9_]\+\)\.[0-9\.]\+$,\1,p;q}
/^[a-zA-Z0-9]\+$/{p;q} # <pck_name> (with no version)
# <pck_name> (no version, but <pck_name> can end with numbers)
/^[^0-9]*[0-9]*$/p")
/^.*\.${SPEC_VERSION}.*/{s,\.${SPEC_VERSION}.*,,;q}
# name ending with -<something_looking_like_a_version>
/^.*-[0-9][0-9.]*[0-9]/{s,\-[0-9][0-9.]*[0-9],,;q}
# <pck_name> (not matching version but with <pck_name> ending with numbers)
/^[^0-9]*[0-9]*$/{s,[0-9]*$,,;q}
# <pck_name> (with no version)
/^[a-zA-Z0-9]\+$/{q}")
notify.debug "$FUNCNAME: $var = \"$SPEC_SOURCE0_PCKNAME\""
;;
SPEC_SOURCE)
@ -1052,15 +1132,21 @@ rpmvars.solve "$filesname" "$specfile")" )
esac
notify.debug "$FUNCNAME: $var = ( ${SPEC_TARGET[*]} )"
;;
*) if [[ -n "$rpm_macro_debug_package" && \
"${tok[0]}" = "$rpm_macro_debug_package" ]]; then
# rpm macro for creating debug packages
SPEC_TARGET=( ${SPEC_TARGET[@]} \
"${SPEC_NAME}-${rpm_macro_debug_package_suffix}" )
fi
;;
esac
done < $specfile
# Add debug package to SPEC_TARGET list if found
if [ "${SPEC_BUILDARCH:-$BUILD_ARCH}" == "noarch" ]; then
dbg_filename="$(package.generate_name -p -a noarch -t rpm \
-n ${SPEC_NAME}-${rpm_macro_debug_package_suffix} -v ${SPEC_VERSION} -r ${SPEC_RELEASE%%[^0-9\.]*})"
else
dbg_filename="$(package.generate_name -p -a ${SPEC_BUILDARCH:-$BUILD_ARCH} -t rpm \
-n ${SPEC_NAME}-${rpm_macro_debug_package_suffix} -v ${SPEC_VERSION} -r ${SPEC_RELEASE%%[^0-9\.]*})"
fi
if [[ -e "$dbg_filename" ]]; then
# rpm macro for creating debug packages
SPEC_TARGET=( ${SPEC_TARGET[@]} \
"${SPEC_NAME}-${rpm_macro_debug_package_suffix}" )
fi
#notify.debug "$FUNCNAME: $var = ( ${SPEC_TARGET[*]} )"
;;
SPEC_OBSOLETES)
@ -1104,7 +1190,7 @@ $FUNCNAME: * entry found at line $linenum: \"${tok[*]}\""
[ $skiptok -gt 0 ] &&
{ skiptok="$(($skiptok-1))"; continue; }
case "$currtok" in
"<"|">"|"<="|">=")
"<"|">"|"<="|">="|"=")
skiptok="1"; continue ;;
",") skiptok="0"; continue ;;
esac
@ -1182,12 +1268,20 @@ $FUNCNAME: SPEC_OBSOLETES = ( ${SPEC_OBSOLETES[*]} )"
fi
notify.debug "$FUNCNAME: $var = $SPEC_BUILDROOT"
;;
SPEC_AUTOUPDATE_OFF)
[ "$SPEC_AUTOUPDATE_OFF" ] && continue
SPEC_AUTOUPDATE_OFF=($(sed -n "\
/^### AUTOUPDATE-OFF:/{
s,### AUTOUPDATE-OFF:[ \t]*,,;{p}}" \
$specfile))
notify.debug "$FUNCNAME: $var = (${SPEC_AUTOUPDATE_OFF[*]})"
;;
*) notify.error $"(bug)"" -- $FUNCNAME: "$"bad arg \`$var'" ;;
esac
# note: some entries are not mandatory in a specfile
case "$var" in
"SPEC_SOURCE"|"SPEC_PATCH"|\
"SPEC_SOURCE"|"SPEC_PATCH"|"SPEC_AUTOUPDATE_OFF"| \
"SPEC_OBSOLETES"|"SPEC_BUILDARCH"|"SPEC_BUILDREQUIRES")
;;
*) if [[ "$var" = "SPEC_BUILDROOT" && \
@ -1244,3 +1338,5 @@ function getversionfromtarball() {
notify.debug "$FUNCNAME: pck_version = \"$pck_version\""
echo "$pck_version"
}
} # endif $libspec_is_loaded

View File

@ -2,21 +2,25 @@
# libtest.lib -- @package@ library used by the test framework
# Copyright (C) 2012 Davide Madrisan <davide.madrisan@gmail.com>
[ "$libtest_is_loaded" = 1 ] || {
libtest_is_loaded=1
[ -z "$BASH" ] || [ ${BASH_VERSION:0:1} -lt 3 ] &&
{ echo $"this script requires bash version 3 or better" >&2 && exit 1; }
me=(${0##*/} "@version@" "@date@")
[ -r @libdir@/libtranslate.lib ] ||
{ echo "\
libtest.lib: "$"library not found"": @libdir@/libtranslate.lib" 1>&2
exit 1; }
. @libdir@/libtranslate.lib
[ -r @libdir@/libmsgmng.lib ] ||
{ echo "$me: "$"library not found"": @libdir@/libmsgmng.lib" 1>&2
{ echo "\
libtest.lib: "$"library not found"": @libdir@/libmsgmng.lib" 1>&2
exit 1; }
. @libdir@/libmsgmng.lib
if [[ -z "$LANG" && -r /etc/sysconfig/i18n ]]; then
. /etc/sysconfig/i18n
[ "$LANG" ] && export LANG
fi
TEXTDOMAIN="libtest"; export TEXTDOMAIN
notify.debug $"loading"": \`libtest.lib'..."
[ -n "$testdir" ] ||
notify.error "\`testdir': "$"unset in the configuration files"
@ -89,11 +93,11 @@ can't create temporary directory"": $tmpextractdir/$i"
pushd $tmpextractdir/$i >/dev/null
rpm2cpio $pck > rpm_extract_tmp.cpio
[ $? -eq 0 ] ||
notify --error $"cannot extract files from rpm archive"
notify.error $"cannot extract files from rpm archive"
cpio --quiet --extract --make-directories < rpm_extract_tmp.cpio
[ $? -eq 0 ] ||
notify --error $"cannot extract files from cpio archive"
notify.error $"cannot extract files from cpio archive"
rm -f rpm_extract_tmp.cpio
popd >/dev/null
@ -170,3 +174,5 @@ function test.runall() {
--tmpdir "$tmpextractdir"
done
}
} # endif $libtest_is_loaded

19
lib/libtranslate.lib.in Normal file
View File

@ -0,0 +1,19 @@
#!/bin/bash
# libtranslate.lib -- @package@ library used to setup translations
# Copyright (C) 2012 Davide Madrisan <davide.madrisan@gmail.com>
[ "$libtranslate_is_loaded" = 1 ] || {
libtranslate_is_loaded=1
[ -z "$BASH" ] || [ ${BASH_VERSION:0:1} -lt 2 ] &&
{ echo $"this script requires bash version 2 or better" >&2 && exit 1; }
# do not load any other library to avoid loops
if [[ -z "$LANG" && -r /etc/sysconfig/i18n ]]; then
. /etc/sysconfig/i18n
[ "$LANG" ] && export LANG
fi
TEXTDOMAIN="@package@"; export TEXTDOMAIN
} # endif $libtranslate_is_loaded

View File

@ -24,7 +24,7 @@
\fBlibtest.lib\fR - libreria con le funzioni del framework di test.
.SH VERSIONE
Questo documento e' aggiornato alla versione 1.14.2 di
Questo documento e' aggiornato alla versione 1.16.5 di
.B @package@.
.SH DESCRIZIONE
@ -48,8 +48,8 @@ esterni ma piuttosto come ulteriore modularizzazione del codice.
.B @package@
e' stato utilizzato con successo dagli sviluppatori della distribuzione
.B QiLinux
(\fIhttp://www.qilinux.org\fP), permettendo la creazione di specfile standard e
.B openmamba
(\fIhttps://openmamba.org\fP), permettendo la creazione di specfile standard e
l'aggiornamento (semi)automatico dei pacchetti.
E' utilizzato attualmente nello sviluppo di
.B openmamba GNU/Linux
@ -88,7 +88,7 @@ ftp_rw_user[1]="<user>"
.TP
ftp_rw_passwd[1]="<passwd>"
.TP
arch_list=(i586 ppc arm x86_64)
arch_list=(i586 arm x86_64 aarch64)
.TP
curl_opts_netlink="--connect-timeout 15 --retry 3 --limit-rate 250k"
.PD
@ -180,7 +180,9 @@ Si ricorda che le opzioni indicate tra parentesi quadre sono opzionali.
[\fB\-t\fR \fItype\fR] \
[\fB\-o\fR \fIoutfile\fR] \
[\fB\--changelog\fR \fI"messaggio"\fR] \
[\fB\<opzioni-git>\fR]
[\fB\<opzioni-git>\fR] \
[\fB\-\-packager-fullname\fR \fI"Nome Completo"\fR] \
[\fB\-\-packager-email\fR \fI"<email@domain>"\fR]
.TP
\fB\-s\fR, \fB\-\-source\fR
cerca di creare uno specfile per l'\fIarchivio\fR indicato
@ -198,17 +200,19 @@ categoria dello specfile da generare:
.br
\fIgnome\fR : specfile per pacchetti gnome
.br
\fIkde3\fR : specfile per pacchetti kde3
.br
\fIkde4\fR : specfile per pacchetti kde4
\fIkde5\fR : specfile per pacchetti kde5
.br
\fIlibrary\fR : specfile per librerie
.br
\fIocaml-libs\fR : specfile per librerie OCaml
.br
\fIperl\fR : specfile per singoli moduli perl
.br
\fIpython\fR : specfile per moduli python
.br
\fIstandard-daemon\fR : specfile per servizi di sistema/rete
.br
\fIweb\fR : specfile per applicazioni web
.TP
\fB\-o\fR, \fB\-\-output\fR
redirige lo standard output sul file \fIoutfile\fR
@ -222,6 +226,12 @@ permette di scegliere un messaggio di ChangeLog diverso da quello di default
.br
\fB\-\-preserve\-dot\-git\fR : non rimuove i file git
.TP
\fB\-\-packager-fullname\fR \fI"Nome Completo"\fR
ridefinisce il nome completo del packager
.TP
\fB\-\-packager-email\fR \fI"<email@domain>"\fR
'indirizzo mail del packager
.TP
\fIEsempi\fR
.TP
.PD 0
@ -257,7 +267,9 @@ permette di scegliere un messaggio di ChangeLog diverso da quello di default
[\fB\-\-nosrpm\fR|\fB\-\-norpm\fR] \
[\fB\-\-force-update\fR] [\fB\-\-force-build\fR] [\fB\-\-force-install\fR] \
[\fB\-\-ignore-test \fIt1\fR[,\fIt2\fR,...]\fR] \
[\fB\-c\fR] [\fB\-f\fR] [\fB\-L\fR] [\fB\-R\fR]
[\fB\-c\fR] [\fB\-f\fR] [\fB\-L\fR] [\fB\-R\fR] \
[\fB\-\-packager-fullname\fR \fI"Nome Completo"\fR] \
[\fB\-\-packager-email\fR \fI"<email@domain>"\fR]
.TP
\fB\-u\fR, \fB\-\-update\fR
aggiorna il pacchetto \fIpck\fR, versione \fIver\fR,
@ -366,6 +378,12 @@ attiva modalita' ed impostazioni di rebuild (azione 4)
\fB\-\-root\fR
definisce una root directory alternativa per rpm
.TP
\fB\-\-packager-fullname\fR \fI"Nome Completo"\fR
ridefinisce il nome completo del packager
.TP
\fB\-\-packager-email\fR \fI"<email@domain>"\fR
ridefinisce l'indirizzo mail del packager
.TP
\fIEsempi\fR
.TP
.PD 0
@ -526,7 +544,7 @@ cioe' eseguendo:
\fBLC_ALL=C autospec\fR ...
.SH COPYRIGHT
Copyright (C) 2004\-2012 Davide Madrisan <davide.madrisan@gmail.com>
Copyright (C) 2004\-2014 Davide Madrisan <davide.madrisan@gmail.com>
.br
.br
Questo e' software libero. E' possibile redistribuirlo e/o modificarlo nei termini

View File

@ -30,6 +30,14 @@ check: $(pck_plugins)
&& echo "[PASSED]" || { echo "[FAILED]"; exit 1; };\
done
pot-files: $(pck_plugins)
@for f in $(pck_plugins); do\
echo -n "Generating po template '$$f.pot'...";\
/bin/bash --dump-po-strings $$f \
> $(srcdir)/po/$$f.pot \
&& echo "[DONE]" || { echo "[ERROR]"; exit 1; };\
done
install: $(pck_plugins)
@$(INSTALL_DIR) $(DESTDIR)$(plugindir)
for f in $(pck_plugins); do\
@ -43,3 +51,6 @@ uninstall:
clean:
rm -f $(patsubst %.in,%,$(pck_plugins_infiles))
@for f in $(pck_plugins); do\
rm -f $(srcdir)/po/$$f.pot;\
done

View File

@ -22,11 +22,10 @@ let "verbose = 1"
exit 1; }
. @libdir@/libcfg.lib
if [[ -z "$LANG" && -r /etc/sysconfig/i18n ]]; then
. /etc/sysconfig/i18n
[ "$LANG" ] && export LANG
fi
TEXTDOMAIN="${me[0]}"; export TEXTDOMAIN
[ -r @libdir@/libtranslate.lib ] ||
{ echo "$me: "$"library not found"": @libdir@/libtranslate.lib" 1>&2
exit 1; }
. @libdir@/libtranslate.lib
function copying() {
echo "\
@ -66,6 +65,8 @@ function usage() {
"$"Samples"":
@frontend@ -q -C ${default_cfg_list[0]} --eval=\"logging_dir\"
@frontend@ --eval rpm_allowed_groups
@frontend@ --eval rpm_approved_licenses
"$"Report bugs to <davide.madrisan@gmail.com>."

View File

@ -1,6 +1,7 @@
#!/bin/bash
# pck-extract -- plugin for @package@
# Copyright (C) 2004-2010 Davide Madrisan <davide.madrisan@gmail.com>
# Copyright (C) 2024 Silvan Calarco <silvan.calarco@mambasoft.it>
[ -z "$BASH" ] || [ ${BASH_VERSION:0:1} -lt 3 ] &&
{ echo $"this script requires bash version 3 or better" >&2 && exit 1; }
@ -27,11 +28,10 @@ let "verbose = 1"
exit 1; }
. @libdir@/libnetwork.lib
if [[ -z "$LANG" && -r /etc/sysconfig/i18n ]]; then
. /etc/sysconfig/i18n
[ "$LANG" ] && export LANG
fi
TEXTDOMAIN="${me[0]}"; export TEXTDOMAIN
[ -r @libdir@/libtranslate.lib ] ||
{ echo "$me: "$"library not found"": @libdir@/libtranslate.lib" 1>&2
exit 1; }
. @libdir@/libtranslate.lib
function copying() {
echo "\
@ -110,6 +110,8 @@ frontend_opts: \
notify.debug "[ ${0} ${exec_options} ]\n"
eval set -- "$exec_options"
cmdline_vars=()
while :; do
case $1 in
-x|--extract) ;;
@ -118,9 +120,16 @@ while :; do
--destdir)
destdir="$2"; shift ;;
--colors)
color_scheme="$2"; shift ;;
color_scheme="$2"; shift
notify.debug "color_scheme = \"$color_scheme\""
cmdline_vars[${#cmdline_vars[*]}]="color_scheme=\"$color_scheme\""
;;
-C|--config)
custom_cfgfile_list="$2"; shift ;;
cfgfile_list_cmdline="$2"; shift
notify.debug "cfgfile_list_cmdline = \"$cfgfile_list_cmdline\""
cmdline_vars[${#cmdline_vars[*]}]="\
cfgfile_list_cmdline=\"$cfgfile_list_cmdline\""
;;
-D|--debug)
let "verbose = 2" ;;
-q|--quiet)
@ -140,10 +149,16 @@ for arg in $@; do
notify.error $"unrecognized option"" -- \`$arg'"
done
notify.enable_colors "$color_scheme"
cfg_load_files "$cfgfile_list_cmdline"
notify.debug "custom_cfgfile_list = \"$custom_cfgfile_list\""
cfg_load_files "$custom_cfgfile_list"
# otherwrite the configuration variables by set them again using
# the values defined via the commanline options
for i in ${!cmdline_vars[@]}; do
notify.debug "eval \"${cmdline_vars[i]}\""
eval "${cmdline_vars[i]}"
done
notify.enable_colors "$color_scheme"
# s_rpm_pck : the name of the srpm package (local or remote)
# (i.e. /usr/src/RPM/SRPMS/automake-1.9-1qilnx.src.rpm)
@ -159,16 +174,16 @@ cfg_load_files "$custom_cfgfile_list"
notify.note "[${NOTE}$s_rpm_pck${NORM}]"
# check if all the needed tools are available
for tool in bunzip2 cpio gunzip mktemp rpm2cpio; do
for tool in bunzip2 tar gunzip mktemp rpm2archive; do
[ "$(type -p $tool)" ] ||
notify.error $"utility not found"": \`$tool'"
done
tmpcpiodir=$(mktemp -q -d -t $me.XXXXXXXX)
tmparchivedir=$(mktemp -q -d -p /var/tmp -t $me.XXXXXXXX)
[ $? -eq 0 ] &&
trap "rm -fr $tmpcpiodir" 0 1 2 3 6 7 9 13 15 ||
trap "rm -fr $tmparchivedir" 0 1 2 3 6 7 9 13 15 ||
notify.error $"can't create temporary files"
notify.debug "$FUNCNAME: tmpcpiodir = $tmpcpiodir"
notify.debug "$FUNCNAME: tmparchivedir = $tmparchivedir"
#local s_rpm_pck_name
case "$s_rpm_pck" in
@ -179,9 +194,9 @@ http://*\.src\.*|http://*\.nosrc\.*|ftp://*\.src\.*|ftp://*\.nosrc\.*)
curl.download \
--options "$curl_options" \
${proxy:+--proxy $proxy} ${proxy_user:+--proxy-user $proxy_user} \
--exit-on-err --destdir="$tmpcpiodir" "$s_rpm_pck"
--exit-on-err --destdir="$tmparchivedir" "$s_rpm_pck"
s_rpm_pck="$tmpcpiodir/$s_rpm_pck_name"
s_rpm_pck="$tmparchivedir/$s_rpm_pck_name"
;;
*\.src\.*|*\.nosrc\.*)
s_rpm_pck_name="$s_rpm_pck"
@ -198,46 +213,37 @@ mkdir -p $destdir 2>/dev/null || notify.error $"cannot create \`$destdir'"
#local errcode
#local \
tmpcpiopck="srpm_pck.cpio"
tmparchivepck="srpm_pck.tar.gz"
notify.debug "\
$FUNCNAME: converting the rpm package into a cpio archive..."
$FUNCNAME: converting the rpm package into a tar.gz archive..."
rpm2cpio $s_rpm_pck > $tmpcpiodir/$tmpcpiopck
rpm2archive $s_rpm_pck > $tmparchivedir/$tmparchivepck
let "errcode = $?"
[ "$errcode" = 0 ] ||
{ rm -fr $tmpcpiodir
notify.debug "$FUNCNAME: exit code of rpm2cpio = \`$errcode'"
{ rm -fr $tmparchivedir
notify.debug "$FUNCNAME: exit code of rpm2archive = \`$errcode'"
notify.error $"can't save extracted files to \`$destdir'"; }
notify.debug "\
$FUNCNAME: extracting files from the cpio archive..."
$FUNCNAME: extracting files from the tar.gz archive..."
pushd $tmpcpiodir &>/dev/null
pushd $tmparchivedir &>/dev/null
tar xzf $tmparchivedir/$tmparchivepck
cpio --quiet --extract --preserve-modification-time \
< $tmpcpiodir/$tmpcpiopck
let "errcode = $?"
[ "$errcode" = 0 ] ||
{ rm -fr $tmpcpiodir
notify.debug "$FUNCNAME: exit code of cpio = \`$errcode'"
{ rm -fr $tmparchivedir
notify.debug "$FUNCNAME: exit code of tar = \`$errcode'"
notify.error $"can't save extracted files to \`$destdir'"; }
rm -f $tmpcpiodir/$tmpcpiopck
#notify.debug "\
#$FUNCNAME: extracting files from the srpm archive..."
#
#rpm2cpio $s_rpm_pck 2>/dev/null | \
#cpio --quiet --extract $filelst &>/dev/null
#[ $? -ne 0 ] &&
# { popd &>/dev/null
# notify.error $"can't save extracted files to \`$destdir'"; }
rm -f $tmparchivedir/$tmparchivepck
popd &>/dev/null
#local fname
for f in $tmpcpiodir/${filelst:-*}; do
for f in $tmparchivedir/${filelst:-*}; do
fname=${f##*/}
notify.debug "$FUNCNAME: fname = \"$fname\""
case $fname in
@ -247,7 +253,7 @@ for f in $tmpcpiodir/${filelst:-*}; do
notify.debug "$FUNCNAME: decompressing the patch..."
bunzip2 $f &>/dev/null
[ $? -eq 0 ] ||
{ rm -fr $tmpcpiodir
{ rm -fr $tmparchivedir
notify.warning $"can't decompress the file"" \`$f'"; }
notify.note " * ${NOTE}$destdir/${fname/\.bz2/}${NORM}"
@ -257,7 +263,7 @@ for f in $tmpcpiodir/${filelst:-*}; do
notify.debug "$FUNCNAME: decompressing the patch..."
gunzip $f &>/dev/null
[ $? -eq 0 ] ||
{ rm -fr $tmpcpiodir
{ rm -fr $tmparchivedir
notify.warning $"can't decompress the file"" \`$f'"; }
notify.note " * ${NOTE}$destdir/${fname/\.gz/}${NORM}"
@ -269,8 +275,8 @@ for f in $tmpcpiodir/${filelst:-*}; do
;;
esac
[ $? -eq 0 ] ||
{ rm -fr $tmpcpiodir
{ rm -fr $tmparchivedir
notify.error $"can't save files to \`$destdir'"; }
done
rm -fr $tmpcpiodir
rm -fr $tmparchivedir

View File

@ -1,6 +1,6 @@
#!/bin/bash
# pck-update -- plugin for @package@
# Copyright (C) 2004-2012 Davide Madrisan <davide.madrisan@gmail.com>
# Copyright (C) 2004-2015 Davide Madrisan <davide.madrisan@gmail.com>
[ -z "$BASH" ] || [ ${BASH_VERSION:0:1} -lt 3 ] &&
{ echo $"this script requires bash version 3 or better" >&2 && exit 1; }
@ -34,6 +34,7 @@ me=(${0##*/} "@version@" "@date@")
# output verbosity
let "verbose = 1"
#
let "noprep = 0"
let "cleanup = 0"
let "spec_format = 0"
let "rebuild = 0"
@ -64,11 +65,10 @@ unset ignore_test_list
exit 1; }
. @libdir@/libcfg.lib
if [[ -z "$LANG" && -r /etc/sysconfig/i18n ]]; then
. /etc/sysconfig/i18n
[ "$LANG" ] && export LANG
fi
TEXTDOMAIN="${me[0]}"; export TEXTDOMAIN
[ -r @libdir@/libtranslate.lib ] ||
{ echo "$me: "$"library not found"": @libdir@/libtranslate.lib" 1>&2
exit 1; }
. @libdir@/libtranslate.lib
function copying() {
echo "\
@ -81,7 +81,7 @@ or FITNESS FOR A PARTICULAR PURPOSE."
function version() {
echo "\
${me[0]} ${me[1]}
Copyright (C) 2004-2012 Davide Madrisan <davide.madrisan@gmail.com>"
Copyright (C) 2004-2013 Davide Madrisan <davide.madrisan@gmail.com>"
}
# $1: optional exit code (default is '1')
@ -94,10 +94,11 @@ function usage() {
@frontend@ -u <pck> -a<lst> [<ver>] [<rel>] [-d v1=r1[,v2=r2,...]] \\
[-l usr:pswd] [-S <specfile>] [-A <arch>] \\
[--server-download <int>] [--server-upload <int>] \\
[--changelog \"msg\" ] [--nosrpm|--norpm] \\
[--changelog \"msg\" ] [--packager-fullname \"Full Name\" ] \\
[--packager-email \"email@domain\" ] [--nosrpm|--norpm] \\
[--force-update] [--force-build] [--force-install] \\
[--force-download] [--ignore-test t1[,t2,...]] \\
[-c] [-f] [-L] [-R] [-C <conf_file>]
[-p] [-c] [-f] [-L] [-R] [-C <conf_file>]
"$"where the above options mean"":
-u, --update "$"Update the package <pck> to version <ver> and release <rel>""
@ -134,6 +135,12 @@ function usage() {
-S, --specfile "$"Name of the specfile (default: <name>.spec)""
-A, --arch "$"Force the architecture to a given value""
--changelog "$"Set change information for the package""
--packager-fullname
"$"Override packager full name""
--packager-email
"$"Override packager email""
--distro-rpm
"$"Override release append tag (predefined: $DISTRO_rpm)""
--nosrpm "$"action"" 5: "$"Only build the rpm packages""
"$"action"" 10: "$"Do not upload the srpm package""
--norpm "$"action"" 5: "$"Only build the srpm package""
@ -141,6 +148,7 @@ function usage() {
--list-check "$"action"" 5: "$"Do a \`list check'""
-b, --update-autobuildreq""
"$"action"" 6: "$"Replace the block AUTOBUILDREQ""
-p, --noprep "$"Skip rpmbuild %prep macro when retrying building from an existing builddir""
-c, --clear "$"Remove all the temporary files except (s)rpm packages""
-f, --format "$"Enable specfile autoformatting""
-L, --log "$"Unable logging to file (logging dir: \`\$logging_dir')""
@ -190,13 +198,14 @@ for arg in $@; do
done
exec_options=`LC_ALL=C getopt \
-o ua:d:l:S:A:bcfLRC:DqhV \
-o ua:d:l:S:A:pbcfLRC:DqhV \
--long \
update,action:,define:,login:,specfile:,arch:,\
server-download:,server-upload:,server:,\
changelog:,nosrpm,norpm,list-check,update-autobuildreq,\
changelog:,packager-fullname:,packager-email:,distro-rpm:,\
nosrpm,norpm,list-check,update-autobuildreq,\
force-update,force-build,force-install,force-download,force,\
ignore-test:,clear,format,log,rebuild,root:,\
ignore-test:,noprep,clear,format,log,rebuild,root:,\
frontend_opts:,colors:,config:,\
debug,quiet,help,version \
-n "$me" -- "$@"`
@ -204,6 +213,8 @@ debug,quiet,help,version \
eval set -- "$exec_options"
cmdline_vars=()
while :; do
case $1 in
-u|--update) ;;
@ -237,7 +248,17 @@ while :; do
ftp_server_upload_id="$2"
shift ;;
--changelog)
changelog_userdef="$2"; shift ;;
changelog_cmdline="$2"; shift
notify.debug "changelog_cmdline = \"$changelog_cmdline\"" ;;
--packager-fullname)
packager_fullname="$2"; shift
cmdline_vars[${#cmdline_vars[*]}]="packager_fullname=\"$packager_fullname\"" ;;
--packager-email)
packager_email="$2"; shift
cmdline_vars[${#cmdline_vars[*]}]="packager_email=\"$packager_email\"" ;;
--distro-rpm)
DISTRO_rpm="$2"; shift
cmdline_vars[${#cmdline_vars[*]}]="DISTRO_rpm=\"$DISTRO_rpm\"" ;;
--nosrpm)
let "nosrpm = 1" ;;
--norpm)
@ -262,6 +283,8 @@ while :; do
let "force_upload = 1" ;;
--ignore-test)
ignore_test_list=$2; shift ;;
-p|--noprep)
noprep=1 ;;
-c|--clear)
cleanup=1 ;;
-f|--format)
@ -278,9 +301,16 @@ while :; do
-q|--quiet)
let "verbose = 0" ;;
--colors)
color_scheme="$2"; shift ;;
color_scheme="$2"; shift
notify.debug "color_scheme = \"$color_scheme\""
cmdline_vars[${#cmdline_vars[*]}]="color_scheme=\"$color_scheme\""
;;
-C|--config)
custom_cfgfile_list="$2"; shift ;;
cfgfile_list_cmdline="$2"; shift
notify.debug "cfgfile_list_cmdline = \"$cfgfile_list_cmdline\""
cmdline_vars[${#cmdline_vars[*]}]="\
cfgfile_list_cmdline=\"$cfgfile_list_cmdline\""
;;
-h|--help)
usage 0 ;;
-V|--version)
@ -311,12 +341,18 @@ if [ -n "$rpm_rootdir" ]; then
notify.error $"no such file or directory"": $rpm_rootdir"
fi
cfg_load_files "$cfgfile_list_cmdline"
# otherwrite the configuration variables by set them again using
# the values defined via the commanline options
for i in ${!cmdline_vars[@]}; do
notify.debug "eval \"${cmdline_vars[i]}\""
eval "${cmdline_vars[i]}"
done
[ "$logging" = "1" ] && color_scheme="none"
notify.enable_colors "$color_scheme"
notify.debug "custom_cfgfile_list = \"$custom_cfgfile_list\""
cfg_load_files "$custom_cfgfile_list"
# default values for non mandatory configuration variables
[ "$logging_dir" ] || logging_dir="${tmppath_dir:-/var/tmp}/@package@"
@ -375,11 +411,11 @@ $"illegal value"": \"$ftp_rw_server_num_default\""
# display users and passwords in the debug messages (default: '0')
debug_print_private_user_infos=0
infofile=$(mktemp -q -t infofile.XXXXXXXX)
infofile=$(mktemp -q -p /var/tmp -t infofile.XXXXXXXX)
[ $? -eq 0 ] || notify.error $"can't create temporary files"
# preprocessed specfile generated by 'rpm --specfile --specedit'
specfile_preprocessed=$(mktemp -q -t specpreproc.XXXXXXXX)
specfile_preprocessed=$(mktemp -q -p /var/tmp -t specpreproc.XXXXXXXX)
[ $? -eq 0 ] || notify.error $"can't create temporary files"
trap "rm -f $infofile $specfile_preprocessed" 0 1 2 3 6 7 9 13 15
@ -478,26 +514,13 @@ done)"
# create the specfile_preprocessed only once
if [ ! -s "$specfile_preprocessed" ]; then
local tmpspreprerr=$(mktemp -q -t $me.XXXXXXXX)
[ $? -eq 0 ] || notify.error $"can't create temporary files"
notify.debug "tmpspreprerr = \`${NOTE}$tmpspreprerr${NORM}'"
local rpmbuild_opts="\
--define=\"%_specdir $spec_dir\" --define=\"%_sourcedir $source_dir\""
notify.debug "running: rpm -q $rpmbuild_opts $USER_RPMDEFINE_OPTS \
--specfile --specedit $SRPM_SPECFILE_WITH_PATH ..."
eval "\
rpm -q $rpmbuild_opts $USER_RPMDEFINE_OPTS --specfile --specedit\
$SRPM_SPECFILE_WITH_PATH \
2> $tmpspreprerr >> $specfile_preprocessed"
[ -s "$tmpspreprerr" ] &&
{ notify.warning $"specfile has errors:"
while read line; do
notify.warning " $line"
done < $tmpspreprerr; }
rm -f $tmpspreprerr
specfile.check_syntax \
--rpmopts "$rpmbuild_opts $USER_RPMDEFINE_OPTS" \
--specfile "$SRPM_SPECFILE_WITH_PATH" \
--specfile-preprocessed "$specfile_preprocessed"
fi
SPECFILE_PREPROCESSED="$specfile_preprocessed"
@ -525,9 +548,9 @@ rpm -q $rpmbuild_opts $USER_RPMDEFINE_OPTS --specfile --specedit\
[ "$SPEC_PATCH" ] || specfile.getvars -s $SPECFILE_PREPROCESSED SPEC_PATCH
[ "$SPEC_SOURCE" ] || specfile.getvars -s $SPECFILE_PREPROCESSED SPEC_SOURCE
[ "$SPEC_LICENSE" ] || specfile.getvars -s $SPECFILE_PREPROCESSED SPEC_LICENSE
[ "$SPEC_BUILDARCH" ] || specfile.getvars -s $SPECFILE_PREPROCESSED SPEC_BUILDARCH
[ "$SPEC_TARGET" ] || specfile.getvars -s $SPECFILE_PREPROCESSED SPEC_TARGET
[ "$SPEC_OBSOLETES" ] || specfile.getvars -s $SPECFILE_PREPROCESSED SPEC_OBSOLETES
[ "$SPEC_BUILDARCH" ] || specfile.getvars -s $SPECFILE_PREPROCESSED SPEC_BUILDARCH
[ "$SPEC_BUILDREQUIRES" ] || specfile.getvars -s $SPECFILE_PREPROCESSED SPEC_BUILDREQUIRES
[ "$SPEC_BUILDROOT" ] || specfile.getvars -s $SPECFILE_PREPROCESSED SPEC_BUILDROOT
@ -710,6 +733,63 @@ function target_cpu.set_and_check() {
notify.error $"unsupported architecture"": \`$target_cpu'"
}
# function target_cpu.set_and_check()
# generate the name of the rpm package
# args:
# -n : package name
# -v : package version
# -r : package release
# -t : rpm or srpm
# -a . architecture
# -p : return the filename with path
function package.generate_name() {
local ARGS
ARGS=`LC_ALL=C getopt \
-o n:v:r:t:a:p \
--long name:,version:,release:,type:,arch:,path \
-n "$FUNCNAME" -- "$@"`
[ $? = 0 ] || notify.error $"(bug)"" -- $FUNCNAME: "$"\`getopt' error"
local rpm_name rpm_version rpm_release \
rpm_type rpm_arch rpm_path rpm_ext with_rpm_path
eval set -- "$ARGS"
while :; do
case "$1" in
-n|--name)
rpm_name="$2"; shift ;;
-v|--version)
rpm_version="$2"; shift ;;
-r|--release)
rpm_release="$2"; shift ;;
-t|--type)
rpm_type="$2"; shift ;;
-a|--arch)
rpm_arch="$2"; shift ;;
-p|--path)
with_rpm_path="1" ;;
--) shift; break ;;
*) notify.error $"\
(bug)"" -- $FUNCNAME: "$"\`getopt' error: bad command \`$1'" ;;
esac
shift
done
if [ "$rpm_type" = "rpm" ]; then
rpm_ext="${rpm_arch}.rpm"
[ "$with_rpm_path" = 1 ] && rpm_path="$rpms_dir/$rpm_arch"
else
rpm_ext="src.rpm"
[ "$with_rpm_path" = 1 ] && rpm_path="$srpms_dir"
fi
notify.debug "$FUNCNAME: retval: ${rpm_path:+$rpm_path/}\
${rpm_name}-${rpm_version}-${rpm_release}$DISTRO_rpm.${rpm_ext}"
echo "${rpm_path:+$rpm_path/}\
${rpm_name}-${rpm_version}-${rpm_release}$DISTRO_rpm.${rpm_ext}"
}
# function package.update()
# do all the actions needed to update an rpm package
# args:
@ -1055,13 +1135,17 @@ check if a new version is available""${NORM}"
unset SPEC_SOURCE0_VERBATIM
specfile.getvars -s $SRPM_SPECFILE_WITH_PATH --verbatim SPEC_SOURCE0
unset SPEC_AUTOUPDATE_OFF
specfile.getvars -s $SRPM_SPECFILE_WITH_PATH SPEC_AUTOUPDATE_OFF
apse.scrapeversion \
--pckname "$SPEC_SOURCE0_PCKNAME" \
--pckurl "${SPEC_SOURCE[0]}" \
--pckurlverbatim "${SPEC_SOURCE0_VERBATIM}" \
--specname "$SPEC_NAME" \
${proxy:+ --proxy $proxy} \
${proxy_user:+ --proxy-user $proxy_user}
${proxy_user:+ --proxy-user $proxy_user} \
--autoupdate-off "${SPEC_AUTOUPDATE_OFF[*]}"
retval=$?
@ -1129,10 +1213,20 @@ rpmvars.solve "$fullURL_new" "$SRPM_SPECFILE_WITH_PATH")
notify.debug "fullURL_new = $fullURL_new"
case "$fullURL_new" in
git://*|http://*.git|https://*.git)
git.download \
--pck-version "$pck_newver" \
--destdir="$source_dir" "$fullURL_new"
http+git://*|https+git://*)
fullURL_new="${fullURL_new/+git}"
[ -e "${source_dir}/${fullURL/*\/}" -a "$force_download" != "1" ] || \
git.download \
--pck-version "$pck_newver" \
--destdir="$source_dir" "$fullURL_new" \
--preserve-dot-git 1
;;
git://*|http://*.git/*|https://*.git/*)
fullURL_new="${fullURL_new/+git}"
[ -e "${source_dir}/${fullURL/*\/}" -a "$force_download" != "1" ] || \
git.download \
--pck-version "$pck_newver" \
--destdir="$source_dir" "$fullURL_new"
;;
*) curl.download --options "$curl_options" $sdflag \
${proxy:+--proxy $proxy} ${proxy_user:+--proxy-user $proxy_user} \
@ -1209,7 +1303,9 @@ s|\(.*[ \t]*${define_list_name[$i]}[ \t]*\).*|\1${define_list_value[$i]}|}" \
# set the changelog entry
local changelog_new
if [ "$changelog_userdef" ]; then
if [ "$changelog_cmdline" ]; then
changelog_new="$changelog_cmdline"
elif [ "$changelog_userdef" ]; then
changelog_new="$changelog_userdef"
else
if [ "$pck_newver" = "$SPEC_VERSION" ]; then
@ -1221,6 +1317,7 @@ s|\(.*[ \t]*${define_list_name[$i]}[ \t]*\).*|\1${define_list_value[$i]}|}" \
changelog_new="update to $pck_newver"
fi
fi
notify.debug "changelog_new = \"$changelog_new\""
# NOTE: local specfile_newrelease="$(...)" does not work!
local specfile_newrelease
@ -1248,7 +1345,7 @@ illegal \`format_extra_rules' (see configuration file(s))"
local sharedstatedir=`rpm --eval=%{_sharedstatedir}`
local sysconfdir=`rpm --eval=%{_sysconfdir}`
local tmpspec=$(mktemp -q -t $me.XXXXXXXX)
local tmpspec=$(mktemp -q -p /var/tmp -t $me.XXXXXXXX)
[ $? -eq 0 ] ||
notify.error $"can't create temporary files"
notify.debug "tmpspec = \`${NOTE}$tmpspec${NORM}'"
@ -1385,7 +1482,7 @@ for i in $(seq 1 1 ${#spec_lines[@]}); do
echo -n "\n ${spec_lines[$i-1]}"
done)"
local tmppreamble=$(mktemp -q -t $me.XXXXXXXX)
local tmppreamble=$(mktemp -q -p /var/tmp -t $me.XXXXXXXX)
[ $? -eq 0 ] ||
notify.error $"can't create temporary files"
notify.debug "tmppreamble = \`${NOTE}$tmppreamble${NORM}'"
@ -1825,8 +1922,8 @@ the release entered at command line doesn't match the version set in the specfil
for pck in ${SPEC_TARGET[*]}; do
# FIXME : we should check and complain if the package has
# been built for a different architecture
filename="$rpms_dir/$target_cpu/\
$pck-$pck_rpmversion-$pck_rpmrelease$DISTRO_rpm.$target_cpu.rpm"
filename="$(package.generate_name -a $target_cpu -t rpm \
-p $rpms_dir -n $pck -v $pck_rpmversion -r $pck_rpmrelease)"
notify.debug "\
filename = $filename ""\
$([ -f "$filename" ] && echo "(found)" || echo "(not found)")"
@ -1841,12 +1938,12 @@ $([ -f "$filename" ] && echo "(found)" || echo "(not found)")"
notify.debug "norpms = $norpms (forced)"
# check if the srpm file already exists
filename="\
$srpms_dir/$SPEC_NAME-$pck_rpmversion-$pck_rpmrelease$DISTRO_rpm.src.rpm"
filename="$(package.generate_name -t srpm \
-p $srpms_dir -n $SPEC_NAME -v $pck_rpmversion -r $pck_rpmrelease)"
notify.debug "\
filename = $filename ""\
$([ -f "$filename" ] && echo "(found)" || echo "(not found)")"
[ -f "$filename" ] && nosrpm=1 || nosrpm=0
[ -f "$filename" -a "$build_needed" = 0 ] && nosrpm=1
#if [ "$SRPM_SPECFILE_WITH_PATH" -nt "$filename" ]; then
# # rebuild the srpm package if the specfile has been modified
@ -1865,18 +1962,19 @@ ${NOTE}"$"building the rpm packages""${NORM}... "$"skipped"
for pck in ${SPEC_TARGET[*]}; do
# FIXME : we should check and complain if the package has
# been built for a different architecture
filename="$rpms_dir/$target_cpu/\
$pck-$pck_rpmversion-$pck_rpmrelease$DISTRO_rpm.$target_cpu.rpm"
filename="$(package.generate_name -a $target_cpu -t rpm \
-p $rpms_dir -n $pck -v $pck_rpmversion -r $pck_rpmrelease)"
[ -f "$filename" -a "$SRPM_SPECFILE_WITH_PATH" -nt "$filename" ] &&
notify.warning $"\
notify.warning $"\
specfile is newer than rpm package(s) (according to modification date)"
break
done
notify.note "\
${NOTE}"$"building the srpm package""${NORM}... "$"skipped"
filename="\
$srpms_dir/$SPEC_NAME-$pck_rpmversion-$pck_rpmrelease$DISTRO_rpm.src.rpm"
filename="$(package.generate_name -t srpm \
-p $srpms_dir -n $SPEC_NAME -v $pck_rpmversion -r $pck_rpmrelease)"
[ -f "$filename" -a "$SRPM_SPECFILE_WITH_PATH" -nt "$filename" ] &&
notify.warning $"\
specfile is newer than srpm (according to modification date)"
@ -1911,7 +2009,18 @@ build requirement found"": \`${NOTE}$f${NORM}' ""\
# remove duplicates
buildreqs_to_install=(
$(for f in ${buildreqs_to_install[@]}; do echo $f; done | sort -u))
$(for f in ${buildreqs_to_install[@]}; do
if [ "${f/*.}" == "arm" -o "${f/*.}" == "x86_64" -o "${f/*.}" == "i586" ]; then
# if arch specified convert e.g. package.i586 to package@i586
echo ${f/./@}
elif [ "${BUILD_ARCH}" == "x86_64" -a "${target_cpu}" != "x86_64" ]; then
# x86_64: specifying arch is necessary (FIXME: problems with .noarch)
echo $f@${target_cpu}
else
# classic behaviour
echo $f
fi
done | sort -u))
# install missing build requirements
if [[ "${buildreqs_to_install[@]}" ]]; then
@ -1932,7 +2041,7 @@ installing missing build requirement"": \`${NOTE}$f${NORM}'"
else
$rpm_download_and_install ${buildreqs_to_install[*]}
fi
[ $? -eq 0 ] || notify.error $"\
[ $? -eq 0 ] || notify.warning $"\
cannot install the needed build requirements"
else
notify.error $"\
@ -1961,10 +2070,20 @@ rpmvars.solve "$fullURL" "$SRPM_SPECFILE_WITH_PATH")
notify.debug "fullURL = $fullURL"
case "$fullURL" in
git://*|http://*.git|https://*.git)
git.download \
--pck-version "$pck_rpmversion" \
--destdir="$source_dir" "$fullURL"
http+git://*|https+git://*)
fullURL="${fullURL/+git}"
[ -e "${source_dir}/${fullURL/*\/}" -a "$force_download" != "1" ] || \
git.download \
--pck-version "$pck_rpmversion" \
--destdir="$source_dir" "$fullURL" \
--preserve-dot-git 1
;;
git://*|http://*.git/*|https://*.git/*)
fullURL="${fullURL/+git}"
[ -e "${source_dir}/${fullURL/*\/}" -a "$force_download" != "1" ] || \
git.download \
--pck-version "$pck_rpmversion" \
--destdir="$source_dir" "$fullURL"
;;
*) curl.download --options "$curl_options" $sdflag \
${proxy:+--proxy $proxy} ${proxy_user:+--proxy-user $proxy_user} \
@ -1997,24 +2116,26 @@ ${proxy:+--proxy $proxy} ${proxy_user:+--proxy-user $proxy_user} \
--define=\"%_specdir $spec_dir\" \
--define=\"%_sourcedir $source_dir\" \
--define=\"%_builddir $build_dir\" \
--define=\"%_tmppath $tmppath_dir\""
--define=\"%_tmppath $tmppath_dir\" \
--define=\"%_buildrootdir $tmppath_dir\""
# [ "$rpm_rootdir" ] &&
# rpmbuild_opts="$rpmbuild_opts $rpm_root_opts"
# check if we are cross-compiling
[ "$BUILD_ARCH" != "$target_cpu" ] &&
rpmbuild_opts="--target $target_cpu $rpmbuild_opts"
USER_RPMDEFINE_OPTS="--target $target_cpu $USER_RPMDEFINE_OPTS"
[ "$noprep" = "1" ] && rpmbuild_opts="$rpmbuild_opts --noprep"
[ "$cleanup" = "1" ] && rpmbuild_opts="$rpmbuild_opts --clean"
# note: exit with error when build requirements are missing
notify.note "${NOTE}"$"testing out specfile""${NORM}..."
eval "rpmbuild --nobuild \
$rpmbuild_opts $rpm_root_opts $USER_RPMDEFINE_OPTS \
$USER_RPMDEFINE_OPTS $rpmbuild_opts $rpm_root_opts \
$SRPM_SPECFILE_WITH_PATH 2>&1" ||
notify.error $"rpmbuild exited with error code":" \`$?'"
notify.debug "define_list_name = (${define_list_name[*]})"
notify.debug "define_list_value = (${define_list_value[*]})"
@ -2025,10 +2146,10 @@ ${NOTE}"$"building the rpm packages""${NORM}... "$"skipped"
for pck in ${SPEC_TARGET[*]}; do
# FIXME : we should check and complain if the package has
# been built for a different architecture
filename="$rpms_dir/$target_cpu/\
$pck-$pck_rpmversion-$pck_rpmrelease$DISTRO_rpm.$target_cpu.rpm"
filename="$(package.generate_name -a $target_cpu -t rpm \
-p $rpms_dir -n $pck -v $pck_rpmversion -r $pck_rpmrelease)"
[ -f "$filename" -a "$SRPM_SPECFILE_WITH_PATH" -nt "$filename" ] &&
notify.warning $"\
notify.warning $"\
specfile is newer than rpm package(s) (according to modification date)"
break
done
@ -2038,8 +2159,8 @@ specfile is newer than rpm package(s) (according to modification date)"
notify.note "\
${NOTE}"$"building the srpm package""${NORM}... "$"skipped"
filename="\
$srpms_dir/$SPEC_NAME-$pck_rpmversion-$pck_rpmrelease$DISTRO_rpm.src.rpm"
filename="$(package.generate_name -t srpm \
-p $srpms_dir -n $SPEC_NAME -v $pck_rpmversion -r $pck_rpmrelease)"
[ -f "$filename" -a "$SRPM_SPECFILE_WITH_PATH" -nt "$filename" ] &&
notify.warning $"\
specfile is newer than srpm (according to modification date)"
@ -2058,18 +2179,18 @@ $SRPM_SPECFILE_WITH_PATH $USER_RPMDEFINE_OPTS 2>&1"
# as the dependencies check is done before, it is safe to pass
# --nodeps to non-simulated build commands.
eval "\
rpmbuild -bs $rpmbuild_opts --nodeps \
$SRPM_SPECFILE_WITH_PATH $USER_RPMDEFINE_OPTS 2>&1"
rpmbuild -bs $USER_RPMDEFINE_OPTS $rpmbuild_opts \
$SRPM_SPECFILE_WITH_PATH 2>&1"
elif [ "$nosrpm" = 1 ]; then
notify.note "${NOTE}"$"building the rpm packages""${NORM}..."
eval "\
rpmbuild -bb $rpmbuild_opts --nodeps \
$SRPM_SPECFILE_WITH_PATH $USER_RPMDEFINE_OPTS 2>&1"
rpmbuild -bb $USER_RPMDEFINE_OPTS $rpmbuild_opts \
$SRPM_SPECFILE_WITH_PATH 2>&1"
else
notify.note "${NOTE}"$"building rpm and srpm packages""${NORM}..."
eval "\
rpmbuild -ba $rpmbuild_opts --nodeps \
$SRPM_SPECFILE_WITH_PATH $USER_RPMDEFINE_OPTS 2>&1"
rpmbuild -ba $USER_RPMDEFINE_OPTS $rpmbuild_opts \
$SRPM_SPECFILE_WITH_PATH 2>&1"
fi
local rpmbuild_retcode="$?"
if [ $rpmbuild_retcode -eq 0 ]; then
@ -2078,11 +2199,19 @@ It seems good but do not forget to run quality and security tests"\
" (-a8)${NORM}""
"
else
local tmpunpackfiles=$(mktemp -q -t $me.XXXXXXXX)
local tmpunpackfiles=$(mktemp -q -p /var/tmp -t $me.XXXXXXXX)
[ $? -eq 0 ] || notify.error $"can't create temporary files"
notify.debug "tmpunpackfiles = \`${NOTE}$tmpunpackfiles${NORM}'"
local skipline=1
local format_unpackaged_file_list_arch="\
format_unpackaged_file_list_${target_cpu}"
[ -n "${!format_unpackaged_file_list_arch}" ] ||
notify.warning \
$"no arch-specific pattern translations for unpackaged files"
notify.debug "\
format_unpackaged_file_list_arch = $format_unpackaged_file_list_arch"
while read line; do
case "$line" in
"error: Installed (but unpackaged) file(s) found:")
@ -2090,10 +2219,10 @@ It seems good but do not forget to run quality and security tests"\
"") skipline=1 ;;
esac
[ "$skipline" = 1 ] || echo "$line"
done < <(LC_ALL=C rpmbuild -bl --nodeps --nobuild \
done < <(LC_ALL=C eval rpmbuild -bl $rpmbuild_opts --nodeps --nobuild \
$SRPM_SPECFILE_WITH_PATH $USER_RPMDEFINE_OPTS 2>&1) | \
sed -e "$format_unpackaged_file_list" \
> $tmpunpackfiles
sed -e "$format_unpackaged_file_list_common;\
${!format_unpackaged_file_list_arch}" > $tmpunpackfiles
if [ -s "$tmpunpackfiles" ]; then
notify.error $"\
@ -2136,11 +2265,11 @@ build the list of the build requirements""${NORM}"
# FIXME : we should check and complain if the package has
# been built for a different architecture
if [ "${SPEC_BUILDARCH:-$BUILD_ARCH}" == "noarch" ]; then
filename="$rpms_dir/noarch/\
$pck-$pck_rpmversion-$pck_rpmrelease$DISTRO_rpm.noarch.rpm"
filename="$(package.generate_name -p -a noarch -t rpm \
-n $pck -v $pck_rpmversion -r $pck_rpmrelease)"
else
filename="$rpms_dir/$target_cpu/\
$pck-$pck_rpmversion-$pck_rpmrelease$DISTRO_rpm.$target_cpu.rpm"
filename="$(package.generate_name -p -a $target_cpu -t rpm \
-n $pck -v $pck_rpmversion -r $pck_rpmrelease)"
fi
[ -e $filename ] ||
notify.error $"package not found"": \`$filename'"
@ -2150,7 +2279,7 @@ $pck-$pck_rpmversion-$pck_rpmrelease$DISTRO_rpm.$target_cpu.rpm"
notify.debug "SPEC_TARGET = [ ${SPEC_TARGET[*]} ]"
notify.debug "pcks_list = [ ${pcks_list[*]} ]"
local frequires=$(mktemp -q -t frequires.XXXXXXXX) ||
local frequires=$(mktemp -q -p /var/tmp -t frequires.XXXXXXXX) ||
notify.error $"can't create temporary files"
# FIXME: "/usr/lib/perl5" should be defined in autospec.conf
local perl_prefixes=$(perl -V | grep "^[[:space:]]\+/usr/lib/perl5")
@ -2181,8 +2310,12 @@ $pck-$pck_rpmversion-$pck_rpmrelease$DISTRO_rpm.$target_cpu.rpm"
elif [ "${req:0:1}" = "/" ]; then
# file requirement; ignore
:
elif [ "${req:0:1}" = "(" ]; then
# rich requirement; add as it is
buildreq="$line"
elif [ "${req:0:7}" = "rpmlib(" -o \
"${req:0:7}" = "config(" -o \
"${req:0:5}" = "rtld(" -o \
"${req:0:11}" = "executable(" ]; then
# not a build requirement
:
@ -2196,18 +2329,27 @@ $pck-$pck_rpmversion-$pck_rpmrelease$DISTRO_rpm.$target_cpu.rpm"
sed "s|\(.*\)-[^-]*-[^-]*|\1|")
[ "$buildreq" ] && break
done
[ "$buildreq" ] ||
echo "# $req: perl requirement not resolved"
[ "$buildreq" ] || buildreq="$req"
elif [ "${req}" = "python(abi)" ]; then
# FIXME: libpython-devel should be defined in autospec.conf
# python requirement
buildreq="libpython-devel"
reqver=${line/*= /}
buildreq="libpython${reqver/\.}-devel"
rpm -q --qf %{name} --whatprovides "$buildreq" &>/dev/null || {
buildreq="libpython${reqver/\.*}-devel"
}
elif [[ "$req" =~ .*\.so\.[0-9]* ]]; then
solibpath_catch=""
# is a shared library
# req="libGL.so.1(libc6)" => /usr/lib/libGL.so
reqpath=$($path_ldconfig -Np | \
reqpaths=$($path_ldconfig -Np | \
sed -n "s, ,,g;/${req/(*)/}/{s,.*=>,,;p}")
reqpath=""
for l in $reqpath; do
[ "${reqpath}" = "" ] && reqpath=$l
# Prefer solib in libdir path in case of multiple choices
[ "`dirname $l`" = "${libdir}" ] && { reqpath=$l; break; }
done
solibpath="${reqpath/\.so\.*/.so}"
notify.debug "\
req=\"$req\" ($reqpath) =?> solibpath=\"$solibpath\""
@ -2240,20 +2382,33 @@ $(echo $solibpath | sed "s|-[0-9.]*\.so|.so|")"
fi
if [ "$solibpath_catch" ]; then
rpm --qf %{name} -qf $solibpath_catch &>/dev/null &&
buildreq="$(rpm --qf %{name} -qf $solibpath_catch)" ||
buildreq="$(rpm --qf "%{name}\n" -qf $solibpath_catch|head -n1)" ||
echo "\
#$req: $solibpath_catch: file not owned by any package"
else
echo "#$req: .so link not found"
if [ "${req:0:8}" != "ld-linux" -a "${req:0:13}" != "libpthread.so" ]; then
echo "#$req: .so link not found"
fi
fi
else
echo "\
#$req: library not reported by ldconfig; run \`ldconfig' and try again"
# Find installed package providing library using rpm
buildreq=
rpm -q --qf %{name} --whatprovides "$req" &>/dev/null &&
buildreq="$(rpm -q --qf "%{name}\n" --whatprovides "$req"|head -n1)" ||
echo "#$req: library not reported by ldconfig and not provided in any installed package"
# Find providing package -devel if present
if [ "${buildreq}" != "" ]; then
rpm -q --qf %{name} "${buildreq}-devel" &>/dev/null &&
buildreq="${buildreq}-devel"
fi
fi
elif [[ "$req" =~ .*python.*dist\(.*\).* ]]; then
# Python dist requirement
buildreq="$req"
elif [[ "$req" =~ .*\(.*\) || "$req" =~ .*\.so ]]; then
# a(b) requirement or *.so library
rpm -q --qf %{name} --whatprovides "$req" &>/dev/null &&
buildreq="$(rpm -q --qf %{name} --whatprovides "$req")" ||
buildreq="$(rpm -q --qf "%{name}\n" --whatprovides "$req"|head -n1)" ||
echo "#$req: unidentified build requirement"
else
# other requirements probably coming from static 'Requires:'
@ -2264,7 +2419,7 @@ $(echo $solibpath | sed "s|-[0-9.]*\.so|.so|")"
-a "${buildreq/%-devel/}" = "$buildreq" ]; then
# if a -devel exists for this package, use it
rpm -q ${buildreq}-devel &>/dev/null &&
buildreq="$(rpm -q --qf %{name} ${buildreq}-devel)"
buildreq="$(rpm -q --qf "%{name}\n" ${buildreq}-devel|head -n1)"
fi
if [ "$buildreq" ]; then
# finally print buildrequires block
@ -2275,20 +2430,29 @@ $(echo $solibpath | sed "s|-[0-9.]*\.so|.so|")"
fi
done ) | sort -u >> $frequires
[ "$replace_autobuildreq" = 1 ] &&
notify.note "
${NOTE}"$"replacing the AUTOBUILDREQ block by:""${NORM}"
notify.note "
## AUTOBUILDREQ-BEGIN"
cat $frequires
notify.note "## AUTOBUILDREQ-END
"
notify.note "## AUTOBUILDREQ-END"
if [ "$replace_autobuildreq" = 1 ]; then
sed -i "/^## AUTOBUILDREQ/d" $frequires
sed -i -ne "/## AUTOBUILDREQ-BEGIN/{p;r $frequires" \
-e ':a;n;/## AUTOBUILDREQ-END/{p;b};ba};p' \
$SRPM_SPECFILE_WITH_PATH
sed -n '/^## AUTOBUILDREQ-BEGIN/,/^## AUTOBUILDREQ-END/p' \
$SRPM_SPECFILE_WITH_PATH | grep -q "%if" && skip_replace_autobuildreq=1
if [ "$skip_replace_autobuildreq" ]; then
notify.note "${NOTE}"$"
skipping replacing the AUTOBUILDREQ block because it contains a conditional macro""${NORM}"
else
notify.note "${NOTE}"$"
Replacing the AUTOBUILDREQ block and recreating the SRPM""${NORM}"
sed -i "/^## AUTOBUILDREQ/d" $frequires
sed -i -ne "/## AUTOBUILDREQ-BEGIN/{p;r $frequires" \
-e ':a;n;/## AUTOBUILDREQ-END/{p;b};ba};p' \
$SRPM_SPECFILE_WITH_PATH
eval "\
rpmbuild -bs $USER_RPMDEFINE_OPTS $rpmbuild_opts \
$SRPM_SPECFILE_WITH_PATH 2>&1"
fi
fi
rm -f $frequires
@ -2315,41 +2479,28 @@ simulate the installation of the rpm package(s)""${NORM}"
notify.debug "SPEC_TARGET = [${SPEC_TARGET[*]}]"
local filenames=
for pck in ${SPEC_TARGET[*]}; do
# FIXME : we should check and complain if the package has
# been built for a different architecture
if [ "${SPEC_BUILDARCH:-$BUILD_ARCH}" == "noarch" ]; then
filename="$rpms_dir/noarch/\
$pck-$pck_rpmversion-$pck_rpmrelease$DISTRO_rpm.noarch.rpm"
filename="$(package.generate_name -p -a noarch -t rpm \
-n $pck -v $pck_rpmversion -r $pck_rpmrelease)"
else
filename="$rpms_dir/$target_cpu/\
$pck-$pck_rpmversion-$pck_rpmrelease$DISTRO_rpm.$target_cpu.rpm"
filename="$(package.generate_name -p -a $target_cpu -t rpm \
-n $pck -v $pck_rpmversion -r $pck_rpmrelease)"
fi
notify.note " * $filename"
[ -e $filename ] ||
notify.error $"package not found"": \`$filename'"
filenames="$filenames $filename"
done
notify.debug "rpm -U --test ${rpm_root_opts:+$rpm_root_opts }\
$(for pck in ${SPEC_TARGET[*]}; do
if [ "${SPEC_BUILDARCH:-$BUILD_ARCH}" == "noarch" ]; then
echo -n "$rpms_dir/noarch/\
$pck-$pck_rpmversion-$pck_rpmrelease$DISTRO_rpm.noarch.rpm "
else
echo -n "$rpms_dir/$target_cpu/\
$pck-$pck_rpmversion-$pck_rpmrelease$DISTRO_rpm.$target_cpu.rpm "
fi
done)"
rpm -U --test $rpm_root_opts \
$(for pck in ${SPEC_TARGET[*]}; do
if [ "${SPEC_BUILDARCH:-$BUILD_ARCH}" == "noarch" ]; then
echo -n "$rpms_dir/noarch/\
$pck-$pck_rpmversion-$pck_rpmrelease$DISTRO_rpm.noarch.rpm "
else
echo -n "$rpms_dir/$target_cpu/\
$pck-$pck_rpmversion-$pck_rpmrelease$DISTRO_rpm.$target_cpu.rpm "
fi
done) || notify.error $"rpm exited with error code:"" \`$?'"
notify.debug "rpm -U --test ${rpm_root_opts:+$rpm_root_opts } $filenames"
rpm -U --test $rpm_root_opts $filenames ||
notify.error $"rpm exited with error code:"" \`$?'"
;;
8) notify.note "[${NOTE}step $step${NORM}] -- ${NOTE}"$"\
perform some quality and security checks""${NORM}"
@ -2376,7 +2527,7 @@ pck_newver = \"$pck_newver\", pck_newrel = \"$pck_newrel\""
notify.debug "pck_rpmrelease = $pck_rpmrelease"
local tmpextractdir
tmpextractdir=$(mktemp -q -d -t rpm_extract.XXXXXXXX)
tmpextractdir=$(mktemp -q -d -p /var/tmp -t rpm_extract.XXXXXXXX)
[[ $? -eq 0 ]] ||
notify.error $"can't create temporary files"
notify.debug "$FUNCNAME: tmpextractdir = $tmpextractdir"
@ -2453,8 +2604,8 @@ calculate the md5/sha1 hashing values""${NORM}"
# ??? th md5sum values differ from the output of the ???
# ??? command `rpmsign -v --checksig <rpmfile>' ???
for tool in md5sum sha1sum; do
local filename="\
$srpms_dir/$SPEC_NAME-$pck_rpmversion-$pck_rpmrelease$DISTRO_rpm.src.rpm"
local filename="$(package.generate_name -p -t srpm \
-n $SPEC_NAME -v $pck_rpmversion -r $pck_rpmrelease)"
[[ -e $filename ]] ||
notify.error $"package not found"": \`$filename'"
@ -2463,11 +2614,11 @@ $srpms_dir/$SPEC_NAME-$pck_rpmversion-$pck_rpmrelease$DISTRO_rpm.src.rpm"
local i=0
for pck in ${SPEC_TARGET[@]}; do
if [ "${SPEC_BUILDARCH:-$BUILD_ARCH}" == "noarch" ]; then
filename="$rpms_dir/noarch/\
$pck-$pck_rpmversion-$pck_rpmrelease$DISTRO_rpm.noarch.rpm"
filename="$(package.generate_name -p -a noarch -t rpm \
-n $pck -v $pck_rpmversion -r $pck_rpmrelease)"
else
filename="$rpms_dir/$target_cpu/\
$pck-$pck_rpmversion-$pck_rpmrelease$DISTRO_rpm.$target_cpu.rpm"
filename="$(package.generate_name -p -a $target_cpu -t rpm \
-n $pck -v $pck_rpmversion -r $pck_rpmrelease)"
fi
[ -e "$filename" ] ||
notify.error $"package not found"": \`$filename'"
@ -2510,7 +2661,7 @@ $pck-$pck_rpmversion-$pck_rpmrelease$DISTRO_rpm.$target_cpu.rpm"
--urlnum "$ftp_server_upload_num" \
--proxy "$proxy" \
--proxy-user "$proxy_user" \
"$pck_name" ${SPEC_OBSOLETES[@]}
"$pck_name"
# FIXME: `$?' is nonzero if the argument of `--urllist' is "";
# this generally happens with a buggy configuration file but we
# do not stop the execution here with an errors condition
@ -2576,13 +2727,7 @@ ftp_server_upload_num = \"$ftp_server_upload_num\" (was unset)"
notify.debug "\
ftp_server_upload_num = \"$ftp_server_upload_num\""
if [ "${ftp_rw_server[$ftp_server_upload_num]}" ]; then
repository.is_reachable "${ftp_rw_server[$ftp_server_upload_num]}"
# NOTE. notify.error --> notify.warning because host command fails
# in qemu-arm environment (1.4.18)
[ $? -eq 0 ] || notify.warning $"\
server unreachable"": \`${ftp_rw_server[$ftp_server_upload_num]}'"
else
if [ ! "${ftp_rw_server[$ftp_server_upload_num]}" ]; then
notify.error $"\
you have no read write access to url#$ftp_server_upload_num"
break
@ -2688,9 +2833,8 @@ ftp upload has been disabled"" (do_ftp_upload = \"0\")"
# copy noarch packages to all the repository set in the
# configuration variable `arch_noarch_upload[]'
if [ "${SPEC_BUILDARCH:-$BUILD_ARCH}" = "noarch" ]; then
filename="\
$pck-$pck_rpmversion-$pck_rpmrelease$DISTRO_rpm.noarch.rpm"
filename="$(package.generate_name -a noarch -t rpm \
-n $pck -v $pck_rpmversion -r $pck_rpmrelease)"
for upload_arch in \
${arch_noarch_upload[$ftp_server_upload_num]}; do
if [ "$upload_arch" == "@arch@" ]; then
@ -2716,8 +2860,8 @@ $([ "$debug_print_private_user_infos" = 1 ] && echo -n "--debug-unsecure ") \
$upload_ftp_server${upload_ftp_port:+:$upload_ftp_port}/$currurl/$filename
done
else
filename="\
$pck-$pck_rpmversion-$pck_rpmrelease$DISTRO_rpm.$target_cpu.rpm"
filename="$(package.generate_name -a $target_cpu -t rpm \
-n $pck -v $pck_rpmversion -r $pck_rpmrelease)"
currurl="\
$(repository.resolveURL "$upload_ftp_rpms_dir" "$target_cpu")"
@ -2735,8 +2879,8 @@ $upload_ftp_server${upload_ftp_port:+:$upload_ftp_port}/$currurl/$filename
# SRPM package...
if [ "$nosrpm" = "0" ]; then
filename="\
$SPEC_NAME-$pck_rpmversion-$pck_rpmrelease$DISTRO_rpm.src.rpm"
filename="$(package.generate_name -t srpm \
-n $SPEC_NAME -v $pck_rpmversion -r $pck_rpmrelease)"
[ "$do_ftp_upload" = "0" ] || curl.upload \
$([ "$debug_print_private_user_infos" = 1 ] && echo -n "--debug-unsecure ") \
@ -2933,11 +3077,11 @@ ${NOTE}"$"install the new rpm packages"" ("$"force enabled"")${NORM}..." ||
local pck2install_list=""
for pck in ${SPEC_TARGET[@]}; do
if [ "${SPEC_BUILDARCH:-$BUILD_ARCH}" == "noarch" ]; then
filename="$rpms_dir/noarch/\
$pck-$pck_rpmversion-$pck_rpmrelease$DISTRO_rpm.noarch.rpm"
filename="$(package.generate_name -p -a noarch -t rpm \
-n $pck -v $pck_rpmversion -r $pck_rpmrelease)"
else
filename="$rpms_dir/$target_cpu/\
$pck-$pck_rpmversion-$pck_rpmrelease$DISTRO_rpm.$target_cpu.rpm"
filename="$(package.generate_name -p -a $target_cpu -t rpm \
-n $pck -v $pck_rpmversion -r $pck_rpmrelease)"
fi
[[ -n "$rpm_install_noinstall_mask" &&

View File

@ -1,6 +1,6 @@
#!/bin/bash
# pck-create -- plugin for @package@
# Copyright (C) 2004-2012 Davide Madrisan <davide.madrisan@gmail.com>
# Copyright (C) 2004-2015 Davide Madrisan <davide.madrisan@gmail.com>
[ -z "$BASH" ] || [ ${BASH_VERSION:0:1} -lt 3 ] &&
{ echo $"this script requires bash version 3 or better" >&2 && exit 1; }
@ -40,9 +40,13 @@ spec_cmd_configure_autotools="%configure"
spec_cmd_make_autotools="%make"
spec_cmd_makeinstall_autotools="%makeinstall"
spec_cmd_configure_cmake="%cmake -d build"
spec_cmd_make_cmake="%make"
spec_cmd_makeinstall_cmake="%makeinstall -C build"
spec_cmd_configure_autogen="./autogen.sh\n%configure"
spec_cmd_make_autogen="%make"
spec_cmd_makeinstall_autogen="%makeinstall"
spec_cmd_configure_cmake="%cmake"
spec_cmd_make_cmake="%cmake_build"
spec_cmd_makeinstall_cmake="%cmake_install"
spec_cmd_configure_scons=""
spec_cmd_make_scons="scons"
@ -56,6 +60,10 @@ spec_cmd_configure_default=""
spec_cmd_make_default=""
spec_cmd_makeinstall_default=""
spec_cmd_configure_meson="%meson"
spec_cmd_make_meson="%meson_build"
spec_cmd_makeinstall_meson="%meson_install"
[ "$perl_Makefile_generator" ] || perl_Makefile_generator="Makefile.PL"
preserve_dot_git=0
@ -66,11 +74,10 @@ preserve_dot_git=0
exit 1; }
. @libdir@/libcfg.lib
if [[ -z "$LANG" && -r /etc/sysconfig/i18n ]]; then
. /etc/sysconfig/i18n
[ "$LANG" ] && export LANG
fi
TEXTDOMAIN="${me[0]}"; export TEXTDOMAIN
[ -r @libdir@/libtranslate.lib ] ||
{ echo "$me: "$"library not found"": @libdir@/libtranslate.lib" 1>&2
exit 1; }
. @libdir@/libtranslate.lib
function copying() {
echo "\
@ -83,7 +90,7 @@ or FITNESS FOR A PARTICULAR PURPOSE."
function version() {
echo "\
${me[0]} ${me[1]}
Copyright (C) 2004-2012 Davide Madrisan <davide.madrisan@gmail.com>"
Copyright (C) 2004-2013 Davide Madrisan <davide.madrisan@gmail.com>"
}
# $1: optional exit code (default is '1')
@ -95,6 +102,7 @@ function usage() {
"$"Usage"":
@frontend@ -s <source-archive> [-n <name>] [-v <ver>] [-t <type>] \\
[-o <outfile>] [--changelog \""$"message""\"] [<"$"git-opts"">] \\
[--packager-fullname \"Full Name\" ] [--packager-email \"email@domain\" ] \\
[-C <conf_file>]
"$"where the above options mean"":
@ -103,16 +111,22 @@ function usage() {
-v, --pck-version "$"Version of the package (default: taken from <source-archive> name)""
-t, --type "$"Typology of the specfile to be created""
standard : "$"standard specfile (default)""
ghc : "$"specfile for ghc packages""
gnome : "$"specfile for gnome packages""
kde3 : "$"specfile for kde3 packages""
kde4 : "$"specfile for kde4 packages""
kde5 : "$"specfile for kde5 packages""
library : "$"specfile for common library packages""
ocaml-libs : "$"specfile for OCaml library packages""
perl : "$"specfile for single-package perl modules""
python : "$"specfile for python modules""
standard-daemon : "$"standard specfile for system/network services""
web : "$"specfile for web packages""
-o, --output "$"Redirect the output to the file <outfile>""
--changelog "$"Set change information for the package""
--git-branch "$"Specify a git branch""
--packager-fullname
"$"Override packager full name""
--packager-email
"$"Override packager email""
--git-branch "$"Specify a git branch or tag and (optionally) a commit by appending @commit_id""
--preserve-dot-git "$"Do not remove git files""
--colors "$"Select the theme to be used for the colorized output""
-C, --config "$"Use an alternate user configuration file"" <conf_file>""
@ -127,7 +141,7 @@ function usage() {
"$"Samples"":
@frontend@ -s ~/software/@package@-@version@.tar.bz2 -t standard -o @package@.spec
@frontend@ -s http://ftp.qilinux.it/devel/tools/@package@/@package@-@version@.tar.bz2
@frontend@ -s http://ftp.openmamba.org/devel/tools/@package@/@package@-@version@.tar.bz2
@frontend@ -s @package@-@version@.tar.bz2 --changelog \"First build\"
@frontend@ -s git://anongit.freedesktop.org/gstreamer/gst-omx \\
--git-branch=\"raspberry\" --preserve-dot-git -o gst-omx.spec
@ -163,6 +177,7 @@ exec_options=`LC_ALL=C getopt \
-o s:n:v:t:o:C:DqrhV \
--long \
source:,pck-name:,pck-version:,type:,output:,changelog:,\
packager-fullname:,packager-email:,\
git-branch:,preserve-dot-git,\
colors:,config:,debug,quiet,help,version,\
frontend_opts: \
@ -172,6 +187,8 @@ frontend_opts: \
notify.debug "[ ${0} ${exec_options} ]\n"
eval set -- "$exec_options"
cmdline_vars=()
while :; do
case $1 in
-s|--source)
@ -189,6 +206,12 @@ while :; do
outfile=$2; shift ;;
--changelog)
spec_changelog_comment="$2"; shift ;;
--packager-fullname)
packager_fullname="$2"; shift
cmdline_vars[${#cmdline_vars[*]}]="packager_fullname=\"$packager_fullname\"" ;;
--packager-email)
packager_email="$2"; shift
cmdline_vars[${#cmdline_vars[*]}]="packager_email=\"$packager_email\"" ;;
--git-branch)
git_branch=$2; shift ;;
--preserve-dot-git)
@ -198,9 +221,16 @@ while :; do
-q|--quiet)
let "verbose = 0" ;;
--colors)
color_scheme="$2"; shift ;;
color_scheme="$2"; shift
notify.debug "color_scheme = \"$color_scheme\""
cmdline_vars[${#cmdline_vars[*]}]="color_scheme=\"$color_scheme\""
;;
-C|--config)
custom_cfgfile_list="$2"; shift ;;
cfgfile_list_cmdline="$2"; shift
notify.debug "cfgfile_list_cmdline = \"$cfgfile_list_cmdline\""
cmdline_vars[${#cmdline_vars[*]}]="\
cfgfile_list_cmdline=\"$cfgfile_list_cmdline\""
;;
-h|--help)
usage 0 ;;
-V|--version)
@ -211,14 +241,20 @@ while :; do
shift
done
notify.enable_colors "$color_scheme"
for arg in $@; do
notify.error $"unrecognized option"" -- \`$arg'"
done
notify.debug "custom_cfgfile_list = \"$custom_cfgfile_list\""
cfg_load_files "$custom_cfgfile_list"
cfg_load_files "$cfgfile_list_cmdline"
# otherwrite the configuration variables by set them again using
# the values defined via the commanline options
for i in ${!cmdline_vars[@]}; do
notify.debug "eval \"${cmdline_vars[i]}\""
eval "${cmdline_vars[i]}"
done
notify.enable_colors "$color_scheme"
function specfile.ckeck_defvalues() {
# $1: name of the specfile
@ -363,6 +399,11 @@ shared-libraries:,debug-package:,\
spec_cmd_make="$spec_cmd_make_autotools"
spec_cmd_makeinstall="$spec_cmd_makeinstall_autotools"
;;
autogen)
spec_cmd_configure="$spec_cmd_configure_autogen"
spec_cmd_make="$spec_cmd_make_autogen"
spec_cmd_makeinstall="$spec_cmd_makeinstall_autogen"
;;
makefile)
spec_cmd_configure="$spec_cmd_configure_makefileonly"
spec_cmd_make="$spec_cmd_make_makefileonly"
@ -374,6 +415,12 @@ shared-libraries:,debug-package:,\
spec_cmd_makeinstall="$spec_cmd_makeinstall_scons"
buildrequires_buildtool="scons"
;;
meson)
spec_cmd_configure="$spec_cmd_configure_meson"
spec_cmd_make="$spec_cmd_make_meson"
spec_cmd_makeinstall="$spec_cmd_makeinstall_meson"
buildrequires_buildtool="meson"
;;
unknown)
notify.warning $"unknown build techonology"
spec_cmd_configure="$spec_cmd_configure_default"
@ -389,6 +436,10 @@ $FUNCNAME: buildrequires_buildtool = \"$buildrequires_buildtool\""
[ -r "$templatefile" ] || notify.error $"file not found"": $templatefile"
local pck_name_tail="<FIXME>"
case "$pck_name" in *-*) pck_name_tail="${pck_name#*-}" ;; esac
notify.debug "$FUNCNAME: pck_name_tail = \"$pck_name_tail\""
local currvar line if_value if_level=0
# FIXME: at most two nested @if statements are supported
if_value[0]='N/A'; if_value[1]='1'; if_value[2]='1';
@ -439,6 +490,7 @@ s,@packager_fullname@,${packager_fullname:-?packager_fullname?},
s,@packager_email@,${packager_email:-?packager_email?},
s,@rpm_default_buildroot@,${rpm_default_buildroot:-?rpm_default_buildroot?},
s,@pck_name@,$pck_name,
s,@pck_name_tail@,$pck_name_tail,
s,@pck_version@,$pck_version,
s,@spec_first_release@,${spec_first_release:-1},
s,@spec_run_ldconfig@,$spec_run_ldconfig,
@ -469,13 +521,14 @@ s,@spec_changelog_comment@,$spec_changelog_comment,
# specfile.create()
# Parameters:
# $1 : try to create a specfile from this tarball
# $2 : package name
# $3 : package version
# $4 : package tipology (template)
# $2 : source (with or without path; can be a remote url)
# $3 : package name
# $4 : package version
# $5 : output file
# Description:
# Create an initial specfile to help packaging activities
#
function specfile.create() {
notify.debug "[ ${0}${exec_options} ]\n"
@ -494,16 +547,19 @@ function specfile.create() {
# 'pck_tarball' = absolute path of '$1'
local pck_tarball
local pck_name pck_version
local pck_name
local pck_version="$4"
case "$2" in
git://*|http://*.git|https://*.git)
git.create_tarball \
--pck-version="$pck_version" \
--git-branch="$git_branch" \
--preserve-dot-git="$preserve_dot_git" \
--destdir="$source_dir" "$2"
spec_source="$2/${git_branch:-master}/$spec_source"
pck_tarball="$source_dir/${spec_source##*/}"
;;
http://*|https://*|ftp://*)
pck_tarball="${2##*/}"
@ -532,7 +588,7 @@ ${proxy:+--proxy $proxy} ${proxy_user:+--proxy-user $proxy_user} \
notify.error $"cannot find the package $pck_tarball"
# get the package name from the tarball name
[ "$pck_name" ] || pck_name=${3:-`echo $2 | sed -n "\
[ "$pck_name" ] || pck_name=${3:-`echo $pck_tarball | sed -n "\
s/.*\/// # remove directory name, if any
s/\.[^0-9].*// # remove trailing stuff (.tar.gz, ...)
/-[0-9]*/{s/-[0-9].*//p;q} # <pck_name>-<pck_ver>
@ -543,10 +599,7 @@ ${proxy:+--proxy $proxy} ${proxy_user:+--proxy-user $proxy_user} \
[ "$pck_name" ] ||
notify.error $"cannot get the package name, use the \`-n' option"
[[ "${pck_newver//[0-9\.]/}" ]] &&
notify.error $"invalid version number"" -- \`$pck_newver'"
[ "$pck_version" ] || pck_version=${4:-`echo $2 | sed -n "\
[ "$pck_version" ] || pck_version=${4:-`echo $pck_tarball | sed -n "\
/[0-9]/!q # return nothing if no number is found in the package name
s,.*/,, # remove directory name, if any
s/\.[^0-9].*// # remove trailing stuff (.tar.gz, ...)
@ -571,10 +624,20 @@ ${proxy:+--proxy $proxy} ${proxy_user:+--proxy-user $proxy_user} \
* "$"mode"": ${NOTE}$spec_type${NORM}"
case "$spec_type" in
ghc)
[[ "$pck_name" =~ $ghc_module_name_structure ]] || notify.error $"\
ghc modules must have this name structure (use \`-n'):"" \
\`$ghc_module_name_structure'"
;;
library)
[[ "$pck_name" =~ $library_name_structure ]] || notify.error $"\
libraries must have this name structure (use \`-n'):"" \
\`$library_name_structure'"
;;
ocaml-libs)
[[ "$pck_name" =~ $ocaml_module_name_structure ]] || notify.error $"\
ocaml modules must have this name structure (use \`-n'):"" \
\`$ocaml_module_name_structure'"
;;
perl)
[[ "$pck_name" =~ $perl_module_name_structure ]] || notify.error $"\
@ -591,7 +654,7 @@ python modules must have this name structure (use \`-n'):"" \
# link fd#3 with stdout and redirect stdout to the log file
[ "$outfile" ] && { exec 3<&1; exec 1>>$outfile; }
local tmpdir=`mktemp -q -d -t $me.XXXXXXXX`
local tmpdir=`mktemp -q -d -p /var/tmp -t $me.XXXXXXXX`
[ $? -eq 0 ] ||
notify.error $"can't create temporary directory"
@ -685,7 +748,8 @@ looks like a python module (use \`-t python' if this is true)" ;;
# 2. set 'spec_summary'
local spec_summary="$spec_default_summary"
local perl_pckname_from_makefile=""
case "$spec_type" in perl)
case "$spec_type" in
perl)
if [ -e $tmpdir/$pck_rootdir/Makefile.PL ]; then
# look for the variable `NAME' in Makefile.PL inside the
# 'WriteMakefile(' ... ')' block
@ -701,6 +765,26 @@ looks like a python module (use \`-t python' if this is true)" ;;
fi
[ -n "$perl_pckname_from_makefile" ] &&
spec_summary="$perl_pckname_from_makefile - ..."
;;
ocaml-libs)
local metafile
metafile=$(find $tmpdir/$pck_rootdir/ -type f -name "META" 2>/dev/null)
[ "$metafile" ] || metafile="$(\
find $tmpdir/$pck_rootdir/ -type f -name "META.in" 2>/dev/null)"
if [ "$metafile" ]; then
#notify.debug "$FUNCNAME: OCaml META file found"
while read line; do
if [[ "$line" =~ ^description[\ \t]*=[\ \t]*\".*\"$ ]]; then
spec_summary="... $(\
echo "$line" | sed "s|.*=[\ \t]*\"\(.*\)\"|\1|") ..." # vim highlight need a "
notify.debug "$FUNCNAME: spec_summary = \"$spec_summary\""
break
fi
#if [[ "$line" =~ ^description[\ \t]*=[\ \t]*$ ]]; then
# ... FIXME
done < $metafile
fi
;;
esac
# 3. set 'spec_license'
@ -754,6 +838,9 @@ looks like a python module (use \`-t python' if this is true)" ;;
MANUAL
THANKS'
local standard_docs_dirlist='
LICENSES'
local standard_docs_devel_list='
BACKLOG
BUGS
@ -773,6 +860,14 @@ looks like a python module (use \`-t python' if this is true)" ;;
# ignore empty documentation files
[ -s $tmpdir/$pck_rootdir/$currdoc ] &&
standard_docs="\
${standard_docs:+$standard_docs }$currdoc"
done
done
for doc in $standard_docs_dirlist; do
currdocs=$(cd $tmpdir/$pck_rootdir && ls -d $doc 2>/dev/null)
for currdoc in $currdocs; do
[ -d $tmpdir/$pck_rootdir/$currdoc ] &&
standard_docs="\
${standard_docs:+$standard_docs }$currdoc"
done
done
@ -792,10 +887,12 @@ ${standard_docs_devel:+$standard_docs_devel }$currdoc"
local build_techology="unknown"
case "$spec_type" in
kde3|kde4|perl|python)
perl|python)
build_techology="$spec_type"
;;
*) if [ -e $tmpdir/$pck_rootdir/CMakeLists.txt ]; then
*) if [ -e $tmpdir/$pck_rootdir/meson.build ]; then
build_techology="meson"
elif [ -e $tmpdir/$pck_rootdir/CMakeLists.txt ]; then
build_techology="cmake"
elif [ -x $tmpdir/$pck_rootdir/configure ]; then
build_techology="autotools"
@ -803,6 +900,8 @@ ${standard_docs_devel:+$standard_docs_devel }$currdoc"
-e $tmpdir/$pck_rootdir/makefile -o \
-e $tmpdir/$pck_rootdir/GNUmakefile ]; then
build_techology="makefile"
elif [ -x $tmpdir/$pck_rootdir/autogen.sh ]; then
build_techology="autogen"
elif [ -e $tmpdir/$pck_rootdir/SConstruct -o \
-e $tmpdir/$pck_rootdir/Sconstruct -o \
-e $tmpdir/$pck_rootdir/sconstruct ]; then
@ -854,13 +953,12 @@ $spec_cmd_configure_autotools --enable-gtk-doc"
local pck_library="0"
local pck_tools="1"
case "$spec_type" in library)
[[ "$pck_name" =~ ^lib* ]] ||
[[ "$pck_name" =~ ^lib.* ]] ||
{ pck_library="1"; pck_tools="0"; }
esac
# 12. debug package
local debug_package="0"
[ -n "$rpm_macro_debug_package" ] && debug_package="1"
# FIXME: missing support for:
# pkgconfig files

View File

@ -18,7 +18,23 @@ srcdir = ../..
include $(srcdir)/Makefile.env
pck_catalogs := $(wildcard *.po)
pck_catalogs_tmpl := autospec_fe.pot \
config-getvar.pot \
libapse.pot \
libcfg.pot \
libmsgmng.pot \
libnetwork.pot \
libspec.pot \
libtest.pot \
pck-extract.pot \
pck-update.pot \
spec-create.pot \
test00_specsyntax.pot \
test01_pkgquality.pot \
test02_pkgsecurity.pot
pck_catalog_tmpl := $(PACKAGE).pot
pck_catalog := $(PACKAGE).po
LANG=it
@ -29,21 +45,39 @@ LANG=it
all: locales
locales: $(pck_catalogs:.po=.mo)
pck_manpages :=
install: locales
merge-pot-files: $(patsubst %,$(srcdir)/po/%,$(pck_catalogs_tmpl))
@echo -n "Creating global pot file: $(pck_catalog_tmpl)... "
@/bin/cat $(patsubst %,$(srcdir)/po/%,$(pck_catalogs_tmpl)) \
> $(srcdir)/po/$(PACKAGE)-all.pot;\
/usr/bin/msguniq \
--use-first --no-location --no-wrap --to-code=UTF-8 \
$(srcdir)/po/$(PACKAGE)-all.pot \
-o $(srcdir)/po/$(pck_catalog_tmpl) && \
echo "[DONE]" || { echo "[FAILED]"; exit 1; }
locales: merge-pot-files
@echo -n "Generating global locale: $(pck_catalog)... "
@/usr/bin/msgmerge --quiet \
--update --no-fuzzy-matching --indent \
$(pck_catalog) \
$(srcdir)/po/$(pck_catalog_tmpl) && \
echo "[DONE]" || { echo "[FAILED]"; exit 1; }
@echo -n "Checking $(pck_catalog) for untranslated strings... "
@/bin/grep -q 'msgstr[ \t]*""' $(pck_catalog) && \
{ echo "[UNTRANSLATED STRING]"; exit 1; } || \
echo "[NONE]"
install: $(pck_catalog:.po=.mo)
@destdir="$(DESTDIR)$(localedir)/$(LANG)/LC_MESSAGES";\
$(INSTALL_DIR) $$destdir;\
for f in $(pck_catalogs:.po=); do\
$(INSTALL_DATA) $${f}.mo $$destdir/$${f}.mo;\
done
$(INSTALL_DATA) $(PACKAGE).mo $$destdir/$(PACKAGE).mo
uninstall:
@for f in $(pck_catalogs:.po=); do\
echo "rm -f $(DESTDIR)$(localedir)/$(LANG)/LC_MESSAGES/$${f}.mo";\
rm -f $(DESTDIR)$(localedir)/$(LANG)/LC_MESSAGES/$${f}.mo;\
done
rm -f $(DESTDIR)$(localedir)/$(LANG)/LC_MESSAGES/$(PACKAGE).mo
clean:
rm -f $(pck_catalogs:.po=.mo)
rm -f $(PACKAGE).mo
rm -f $(srcdir)/po/*.pot
rm -f *.po~

1109
po/it/autospec.po Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,101 +0,0 @@
# translation of it.po to Italiana
# Copyright (C) 2004-2008 Davide Madrisan
# Davide Madrisan <davide.madrisan@gmail.com>
#
msgid ""
msgstr ""
"Project-Id-Version: it\n"
"POT-Creation-Date: 2004-09-01 22:48+0200\n"
"PO-Revision-Date: 2008-10-08 16:15+0100\n"
"Last-Translator: Davide Madrisan <davide.madrisan@gmail.com>\n"
"Language-Team: Italiana <it@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: KBabel 1.10.2\n"
msgid "this script requires bash version 2 or better"
msgstr "questo script richiede bash versione 2 o superiore"
msgid ""
"This program is free software; you can redistribute it and/or modify it under\n"
"the terms of the GNU General Public License version 2 as published by the\n"
"Free Software Foundation. There is NO warranty; not even for MERCHANTABILITY\n"
"or FITNESS FOR A PARTICULAR PURPOSE."
msgstr ""
"Questo è software libero; è possibile redistribuirlo e/o modificarlo nei termini\n"
"della GNU General Public License versione 2 così come pubblicata dalla\n"
"Free Software Foundation. Non è fornita ALCUNA garanzia; neppure di NEGOZIABILITA'\n"
"o di APPLICABILITA' PER UN PARTICOLARE SCOPO."
msgid "Automatically update rpm packages and help creating new specfiles."
msgstr "Aggiorna automaticamente pacchetti rpm ed assiste nella creazione di specfile."
msgid "Operation modes"
msgstr "Modalità operative"
msgid "Update the given package to a specified version and release"
msgstr "Aggiorna il pacchetto indicato ad una specifica versione e release"
msgid "Try to create a specfile for the specified tarball"
msgstr "Cerca di creare uno specfile per il tarball indicato"
msgid "Extract a given file or list of files from a srpm archive"
msgstr "Estrae da un archivio srpm un file o una lista di file indicati"
msgid "Print the value of the given configuration variable"
msgstr "Stampa il valore che la variabile indicata ha nei file di configurazione"
msgid "Print this help, then exit"
msgstr "Stampa questa schermata di aiuto e termina il programma"
msgid "Print version number, then exit"
msgstr "Stampa il numero di versione e termina il programma"
msgid "Run in quiet mode"
msgstr "Non stampa alcun dettaglio delle operazioni in esecuzione"
msgid "Select the theme to be used for the colorized output"
msgstr "Seleziona il tema da usare per generare l'output colorato"
msgid "Use an alternate user configuration file"
msgstr "Definisce uno o più file di configurazione utente alternativi"
msgid "Run in debugging mode (very verbose output)"
msgstr "Attiva la modalità di debugging (output prolisso)"
msgid "Common options"
msgstr "Opzioni comuni"
msgid "Usage"
msgstr "Utilizzo"
msgid "Use '-u -h', '-s -h', '-x -h', and '--eval -h' to display specific command line options."
msgstr "Usa '-u -h', '-s -h', '-x -h', '--eval -h' per avere le opzioni a linea di comando specifiche."
msgid "Report bugs to <davide.madrisan@gmail.com>."
msgstr "Segnalare eventuali bug a <davide.madrisan@gmail.com>."
msgid "library not found"
msgstr "libreria non trovata"
msgid "deprecated option"
msgstr "opzione deprecata"
msgid "use \\`--colors' instead"
msgstr "utilizzare \\`--colors'"
msgid "version"
msgstr "versione"
msgid "unset in the configuration files"
msgstr "non configurato nei file di configurazione"
msgid "plugin not found"
msgstr "plugin non trovato"
msgid "can't create temporary files"
msgstr "impossibile creare file temporanei"
msgid "you're running $me as root"
msgstr "stai eseguendo $me come root"

View File

@ -1,94 +0,0 @@
# translation of it.po to Italiana
# Copyright (C) 2004-2008 Davide Madrisan
# Davide Madrisan <davide.madrisan@gmail.com>
msgid ""
msgstr ""
"Project-Id-Version: it\n"
"POT-Creation-Date: 2004-09-01 22:48+0200\n"
"PO-Revision-Date: 2005-11-05 18:03+0100\n"
"Last-Translator: Davide Madrisan <davide.madrisan@gmail.com>\n"
"Language-Team: Italiana <it@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: KBabel 1.10.2\n"
# plugins/config-getvar
msgid "this script requires bash version 3 or better"
msgstr "questo script richiede bash versione 3 o superiore"
msgid "library not found"
msgstr "libreria non trovata"
msgid ""
"This program is free software; you can redistribute it and/or modify it under\n"
"the terms of the GNU General Public License version 2 as published by the\n"
"Free Software Foundation. There is NO warranty; not even for MERCHANTABILITY\n"
"or FITNESS FOR A PARTICULAR PURPOSE."
msgstr ""
"Questo è software libero; è possibile redistribuirlo e/o modificarlo nei termini\n"
"della GNU General Public License versione 2 così come pubblicata dalla\n"
"Free Software Foundation. Non è fornita ALCUNA garanzia; neppure di NEGOZIABILITA'\n"
"o di APPLICABILITA' PER UN PARTICOLARE SCOPO."
msgid "Print the value of a given configuration variable"
msgstr "Stampa il valore che una data variabile assume nei file di configurazione"
msgid "Usage"
msgstr "Utilizzo"
msgid "where the above options mean"
msgstr "dove le precedenti opzioni significano"
msgid "Print the value of the configuration variable <var>"
msgstr "Stampa il valore che <var> assume nei file di configurazione"
msgid "Use an alternate user configuration file"
msgstr "Definisce uno o più file di configurazione utente alternativi"
msgid "Default files:"
msgstr "File di default:"
msgid "Default user files:"
msgstr "File di default utente:"
msgid "Operation modes"
msgstr "Modalità operative"
msgid "Print this help, then exit"
msgstr "Stampa questa schermata di aiuto e termina il programma"
msgid "Print version number, then exit"
msgstr "Stampa il numero di versione e termina il programma"
msgid "Run in quiet mode"
msgstr "Non stampa alcun dettaglio delle operazioni in esecuzione"
msgid "Select the theme to be used for the colorized output"
msgstr "Seleziona il tema da usare per generare l'output colorato"
msgid "Run in debugging mode (very verbose output)"
msgstr "Attiva la modalità di debugging (output prolisso)"
msgid "Samples"
msgstr "Alcuni esempi"
msgid "Report bugs to <davide.madrisan@gmail.com>."
msgstr "Segnalare eventuali bug a <davide.madrisan@gmail.com>."
msgid "cannot read"
msgstr "impossibile leggere"
msgid "unrecognized option"
msgstr "opzione non conosciuta"
msgid "configuration file not found"
msgstr "file di configurazione non trovato"
msgid "(bug)"
msgstr "(bug)"
msgid "unknown variable type"
msgstr "tipo di variabile sconosciuto"

View File

@ -1,110 +0,0 @@
# translation of it.po to Italiana
# Copyright (C) 2004-2008 Davide Madrisan
# Davide Madrisan <davide.madrisan@gmail.com>
msgid ""
msgstr ""
"Project-Id-Version: it\n"
"POT-Creation-Date: 2004-09-01 22:48+0200\n"
"PO-Revision-Date: 2005-11-05 18:03+0100\n"
"Last-Translator: Davide Madrisan <davide.madrisan@gmail.com>\n"
"Language-Team: Italiana <it@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: KBabel 1.10.2\n"
# lib/libapse.lib
msgid "this script requires bash version 2 or better"
msgstr "questo script richiede bash versione 2 o superiore"
msgid "library not found"
msgstr "libreria non trovata"
msgid "version"
msgstr "versione"
msgid "Find for updates scanning the web."
msgstr "Ricerca aggiornamenti cercando nel web."
msgid "Usage"
msgstr "Utilizzo"
msgid "where the above options mean"
msgstr "dove le precedenti opzioni significano"
msgid "Name of the package"
msgstr "Nome del pacchetto"
msgid "Name of the spec file"
msgstr "Nome dello specfile"
msgid "URL of the project home page"
msgstr "Indirizzo internet dell'homepage del progetto"
msgid "URL with no variable expansion"
msgstr "Indirizzo internet senza espansione delle variabili"
msgid "Proxy"
msgstr "Proxy"
msgid "Proxy user"
msgstr "Utenza proxy"
msgid "Operation modes"
msgstr "Modalità operative"
msgid "Print this help, then exit"
msgstr "Stampa questa schermata di aiuto e termina il programma"
msgid "Samples"
msgstr "Alcuni esempi"
msgid "Report bugs to <stefano.cotta@openmamba.org>."
msgstr "Segnalare eventuali bug a <stefano.cotta@openmamba.org>."
msgid "(bug)"
msgstr "(bug)"
msgid "\\`getopt' error"
msgstr "errore in \\`getopt'"
msgid "\\`getopt' error: bad command \\`$1'"
msgstr "errore in \\`getopt': comando errato \\`$1'"
msgid "can't create temporary files"
msgstr "impossibile creare file temporanei"
msgid "looking at"
msgstr "cerco in"
msgid "couldn't resolve host"
msgstr "impossibile risolvere il nome dell'host"
msgid "failed to connect to host"
msgstr "impossibile connettersi all'host"
msgid "curl error (exit code: $retval)"
msgstr "errore curl (codice di errore: $retval)"
msgid "not parametric source0 name; cannot update"
msgstr "source0 in formato non parametrico: impossibile aggiornare"
msgid "found version:"
msgstr "versione trovata:"
msgid "last version of \\`${NOTE}$specname${NORM}' found:"
msgstr "ultima versione di \\`${NOTE}$specname${NORM}' trovata:"
msgid "package \\`${NOTE}$specname${NORM}' is already the latest version"
msgstr "il pacchetto \\`${NOTE}$specname${NORM}' è già aggiornato all'ultima versione"
msgid "a new version of \\`${NOTE}$specname${NORM}' is available!"
msgstr "è disponibile una nuova versione di \\`${NOTE}$specname${NORM}'!"
msgid "a newer version of \\`${NOTE}$specname${NORM}' is already installed"
msgstr "è già installata una versione successiva di \\`${NOTE}$specname${NORM}'"
msgid "cannot find a new version of \\`$specname'"
msgstr "impossibile trovare una nuova versione per \\`$specname'"

View File

@ -1,44 +0,0 @@
# translation of it.po to Italiana
# Copyright (C) 2004-2008 Davide Madrisan
# Davide Madrisan <davide.madrisan@gmail.com>
msgid ""
msgstr ""
"Project-Id-Version: it\n"
"POT-Creation-Date: 2004-09-01 22:48+0200\n"
"PO-Revision-Date: 2005-11-05 18:03+0100\n"
"Last-Translator: Davide Madrisan <davide.madrisan@gmail.com>\n"
"Language-Team: Italiana <it@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: KBabel 1.10.2\n"
# lib/libcfg.lib
msgid "library not found"
msgstr "libreria non trovata"
msgid "configuration file not found"
msgstr "file di configurazione non trovato"
msgid "Hint"
msgstr "Suggerimento"
msgid "user \\`$(id -nu)' does not belong to group \\`$packager_group'"
msgstr "l'utente \\`$(id -nu)' non appartiene al gruppo \\`$packager_group'"
msgid "the file \\`$f' should be readable only by the group \\`$packager_group'"
msgstr "il file \\`$f' dovrebbe essere leggibile solo dal gruppo \\`$packager_group'"
msgid "unset in the configuration files"
msgstr "non configurato nei file di configurazione"
msgid "missing variable in the configuration file"
msgstr "variabile non inizializzata nel file di configurazione"
msgid "loading"
msgstr "caricamento di"
msgid "cannot read"
msgstr "impossibile leggere"

View File

@ -1,27 +0,0 @@
# translation of it.po to Italiana
# Copyright (C) 2004-2008 Davide Madrisan
# Davide Madrisan <davide.madrisan@gmail.com>
msgid ""
msgstr ""
"Project-Id-Version: it\n"
"POT-Creation-Date: 2004-09-01 22:48+0200\n"
"PO-Revision-Date: 2005-11-05 18:03+0100\n"
"Last-Translator: Davide Madrisan <davide.madrisan@gmail.com>\n"
"Language-Team: Italiana <it@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: KBabel 1.10.2\n"
# lib/libmsgmng.lib
msgid "this script requires bash version 2 or better"
msgstr "questo script richiede bash versione 2 o superiore"
msgid "no message"
msgstr "nessun messaggio"
msgid "unknown color theme \\`$color_scheme': colors will be disabled"
msgstr "tema di colori sconosciuto \\`$color_scheme': output con colori disabilitato"

View File

@ -1,107 +0,0 @@
# translation of it.po to Italiana
# Copyright (C) 2008 Davide Madrisan
# Davide Madrisan <davide.madrisan@gmail.com>
msgid ""
msgstr ""
"Project-Id-Version: it\n"
"POT-Creation-Date: 2008-11-05 22:00+0100\n"
"PO-Revision-Date: 2008-11-05 22:00+0100\n"
"Last-Translator: Davide Madrisan <davide.madrisan@gmail.com>\n"
"Language-Team: Italiana <it@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: KBabel 1.10.2\n"
# lib/librepository.lib
msgid "this script requires bash version 2 or better"
msgstr "questo script richiede bash versione 2 o superiore"
msgid "library not found"
msgstr "libreria non trovata"
msgid "(bug)"
msgstr "(bug)"
msgid "\\`getopt' error"
msgstr "errore in \\`getopt'"
msgid "\\`getopt' error: bad command \\`$1'"
msgstr "errore in \\`getopt': commando errato \\`$1'"
msgid "not a number"
msgstr "non è un numero"
msgid "missing mandatory arg"
msgstr "parametro mancante"
msgid "utility not found"
msgstr "programma non trovato"
msgid "can't create temporary files"
msgstr "impossibile creare file temporanei"
msgid "getting list of files from"
msgstr "ricavo l'elenco dei file da"
msgid "couldn't resolve host"
msgstr "impossibile risolvere il nome dell'host"
msgid "failed to connect to host"
msgstr "impossibile connettersi all'host"
msgid "failure in receiving network data"
msgstr "impossibile recevere dati via rete"
msgid "curl error (exit code: $retval)"
msgstr "errore curl (codice di errore: $retval)"
msgid "unsupported query type for this protocol"
msgstr "ricerca non supportata in questo protocollo"
msgid "cannot get the list of files"
msgstr "impossibile ottenere la lista dei file"
msgid "no list of architectures set"
msgstr "nessuna lista di architetture specificata"
msgid "unsupported protocol"
msgstr "protocollo non supportato"
msgid "not an internet address"
msgstr "non è un indirizzo internet"
msgid "no such directory"
msgstr "cartella non trovata"
msgid "cannot download"
msgstr "impossibile scaricare"
msgid "unknown action"
msgstr "azione sconosciuta"
msgid "package not found"
msgstr "pacchetto non trovato"
msgid "downloading"
msgstr "download di"
msgid "not the expected package version"
msgstr "non è la versione di pacchetto prevista"
msgid "cloning git repository"
msgstr "clonazione del repository"
msgid "cannot clone git repository"
msgstr "impossibile clonare il repository git"
msgid "an error occurred while creating"
msgstr "si è verificato un errore durante la creazione di"
msgid "creating the compressed source tarball"
msgstr "creazione del file sorgente compresso"
msgid "done"
msgstr "fatto"

View File

@ -1,146 +0,0 @@
# translation of it.po to Italiana
# Copyright (C) 2004-2008 Davide Madrisan
# Davide Madrisan <davide.madrisan@gmail.com>
msgid ""
msgstr ""
"Project-Id-Version: it\n"
"POT-Creation-Date: 2004-09-01 22:48+0200\n"
"PO-Revision-Date: 2005-11-05 18:03+0100\n"
"Last-Translator: Davide Madrisan <davide.madrisan@gmail.com>\n"
"Language-Team: Italiana <it@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: KBabel 1.10.2\n"
# lib/libspec.lib
msgid "this script requires bash version 2 or better"
msgstr "questo script richiede bash versione 2 o superiore"
msgid "library not found"
msgstr "libreria non trovata"
msgid "(bug)"
msgstr "(bug)"
msgid "missing mandatory arg"
msgstr "parametro mancante"
msgid "detected a specfile with unsupported syntax:"
msgstr "lo specfile usa una sintassi non supportata:"
msgid "\\`getopt' error"
msgstr "errore in \\`getopt'"
msgid "\\`getopt' error: bad command \\`$1'"
msgstr "errore in \\`getopt': comando errato \\`$1'"
msgid "specfile not found"
msgstr "specfile non trovato"
msgid "can't create temporary files"
msgstr "impossibile creare file temporanei"
msgid "rpm exited with error code \\`$?'"
msgstr "rpm è teminato con error \\`$?'"
msgid "FIXME: sorry, not implemented yet..."
msgstr "FIXME: spiacente, implementazione mancante..."
msgid "\\`%end' found; should perhaps be \\`%endif'"
msgstr "\\`%end' utilizzata; forse si intendeva \\`%endif'"
msgid "cannot evaluate:"
msgstr "impossibile valutare:"
msgid "assertion failed:"
msgstr ""
msgid "version"
msgstr "versione"
msgid "Get informations from a given specfile."
msgstr "Ricava informazioni da un specfile dato."
msgid "Usage"
msgstr "Utilizzo"
msgid "where the above options mean"
msgstr "dove le precedenti opzioni significano"
msgid "name (and patch) of the specfile"
msgstr "nome (e percorso) dello specfile"
msgid "do not try to expand variables"
msgstr "non cercare di espandere le variabili"
msgid "and <query> belongs to the following list"
msgstr "e <query> appartiene alla lista seguente"
msgid "list of package groups"
msgstr "lista dei gruppi utilizzati"
msgid "full name of the srpm package"
msgstr "nome completo del pacchetto srpm"
msgid "list of patches"
msgstr "lista delle patch"
msgid "name of the source0 file"
msgstr "name del file indicato da source0"
msgid "list of source files"
msgstr "lista dei source file"
msgid "list of all the generated rpm packages"
msgstr "lista dei pacchetti rpm generati"
msgid "list of the obsoleted packages"
msgstr "lista dei pacchetti resi obsoleti"
msgid "list of the declared build requirements"
msgstr "lista dei \\`build requirements' dichiarati"
msgid "Operation modes"
msgstr "Modalità operative"
msgid "Print this help, then exit"
msgstr "Stampa questa schermata di aiuto e termina il programma"
msgid "Samples"
msgstr "Alcuni esempi"
msgid "Report bugs to <davide.madrisan@gmail.com>."
msgstr "Segnalare eventuali bug a <davide.madrisan@gmail.com>."
msgid "bad specfile preamble"
msgstr "preambolo dello specfile non conforme"
msgid "bad arg \\`$var'"
msgstr "argomento errato \\`$var'"
msgid "cannot initialize \\`$var' from specfile data"
msgstr "impossibile assegnare un valore a \\`$var' usando i dati dello specfile"
msgid "directory not found"
msgstr "cartella non trovata"
msgid "file not found"
msgstr "file non trovato"
msgid "skipped"
msgstr "ignorato"
msgid "couldn't resolve host"
msgstr "impossibile risolvere il nome dell'host"
msgid "failed to connect to host"
msgstr "impossibile connettersi all'host"
msgid "curl error (exit code: $retval)"
msgstr "errore curl (codice di errore: $retval)"
msgid "cannot download"
msgstr "impossibile scaricare"

View File

@ -1,47 +0,0 @@
# translation of it.po to Italiana
# Copyright (C) 2012 Davide Madrisan
# Davide Madrisan <davide.madrisan@gmail.com>
msgid ""
msgstr ""
"Project-Id-Version: it\n"
"POT-Creation-Date: 2012-05-19 12:04+0200\n"
"PO-Revision-Date: 2012-05-19 12:04+0200\n"
"Last-Translator: Davide Madrisan <davide.madrisan@gmail.com>\n"
"Language-Team: Italiana <it@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
# lib/libtest
msgid "\\`getopt' error"
msgstr "errore in \\`getopt'"
msgid "\\`getopt' error: bad command \\`$1'"
msgstr "errore in \\`getopt': comando errato \\`$1'"
msgid "missing mandatory arg"
msgstr "parametro mancante"
msgid "cannot read"
msgstr "impossibile leggere"
msgid "no such file or directory"
msgstr "file o cartella non trovata"
msgid "package not found"
msgstr "pacchetto non trovato"
msgid "can't create temporary directory"
msgstr "impossibile creare la cartella temporanea"
msgid "cannot extract files from rpm archive"
msgstr "impossibile estrarre i file dall'archivio rpm"
msgid "cannot extract files from cpio archive"
msgstr "impossibile estrarre i file dall'archivio cpio"
msgid "unset in the configuration files"
msgstr "non configurato nei file di configurazione"

View File

@ -1,118 +0,0 @@
# translation of it.po to Italiana
# Copyright (C) 2004-2008 Davide Madrisan
# Davide Madrisan <davide.madrisan@gmail.com>
msgid ""
msgstr ""
"Project-Id-Version: it\n"
"POT-Creation-Date: 2004-09-01 22:48+0200\n"
"PO-Revision-Date: 2005-11-05 18:03+0100\n"
"Last-Translator: Davide Madrisan <davide.madrisan@gmail.com>\n"
"Language-Team: Italiana <it@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: KBabel 1.10.2\n"
# plugins/pck-extract
msgid "this script requires bash version 3 or better"
msgstr "questo script richiede bash versione 3 o superiore"
msgid "library not found"
msgstr "libreria non trovata"
msgid ""
"This program is free software; you can redistribute it and/or modify it under\n"
"the terms of the GNU General Public License version 2 as published by the\n"
"Free Software Foundation. There is NO warranty; not even for MERCHANTABILITY\n"
"or FITNESS FOR A PARTICULAR PURPOSE."
msgstr ""
"Questo è software libero; è possibile redistribuirlo e/o modificarlo nei termini\n"
"della GNU General Public License versione 2 così come pubblicata dalla\n"
"Free Software Foundation. Non è fornita ALCUNA garanzia; neppure di NEGOZIABILITA'\n"
"o di APPLICABILITA' PER UN PARTICOLARE SCOPO."
msgid "Extract a given file or list of files from a srpm archive"
msgstr "Estrae da un archivio srpm un file o una lista di file indicati"
msgid "Usage"
msgstr "Utilizzo"
msgid "where the above options mean"
msgstr "dove le precedenti opzioni significano"
msgid "Extract from the srpm package <srpm_pck>..."
msgstr "Estrae dal pacchetto srpm <srpm_pck>..."
msgid "...the specified file or list of files <file(s)>"
msgstr "...il file o la lista di file <file(s)>"
msgid "Save extracted files in the directory <dir>"
msgstr "Salva i file estratti nella cartella <dir>"
msgid "Operation modes"
msgstr "Modalità operative"
msgid "Print this help, then exit"
msgstr "Stampa questa schermata di aiuto e termina il programma"
msgid "Print version number, then exit"
msgstr "Stampa il numero di versione e termina il programma"
msgid "Run in quiet mode"
msgstr "Non stampa alcun dettaglio delle operazioni in esecuzione"
msgid "Select the theme to be used for the colorized output"
msgstr "Seleziona il tema da usare per generare l'output colorato"
msgid "Use an alternate user configuration file"
msgstr "Definisce uno o più file di configurazione utente alternativi"
msgid "Default files:"
msgstr "File di default:"
msgid "Default user files:"
msgstr "File di default utente:"
msgid "Run in debugging mode (very verbose output)"
msgstr "Attiva la modalità di debugging (output prolisso)"
msgid "Samples"
msgstr "Alcuni esempi"
msgid "Report bugs to <davide.madrisan@gmail.com>."
msgstr "Segnalare eventuali bug a <davide.madrisan@gmail.com>."
msgid "cannot read"
msgstr "impossibile leggere"
msgid "unrecognized option"
msgstr "opzione non conosciuta"
msgid "utility not found"
msgstr "programma non trovato"
msgid "can't create temporary files"
msgstr "impossibile creare file temporanei"
msgid "cannot download"
msgstr "impossibile scaricare"
msgid "cannot find:"
msgstr "impossibile trovare:"
msgid "not a srpm package"
msgstr "non è un pacchetto srpm"
msgid "cannot create \\`$destdir'"
msgstr "impossibile creare \\`$destdir'"
msgid "can't save extracted files to \\`$destdir'"
msgstr "impossibile salvare i file estratti in \\`$destdir'"
msgid "can't decompress the file"
msgstr "impossibile decomprimere il file"
msgid "can't save files to \\`$destdir'"
msgstr "impossibile salvare i file in \\`$destdir'"

View File

@ -1,556 +0,0 @@
# translation of it.po to Italiana
# Copyright (C) 2004-2008,2012 Davide Madrisan
# Davide Madrisan <davide.madrisan@gmail.com>
msgid ""
msgstr ""
"Project-Id-Version: it\n"
"POT-Creation-Date: 2004-09-01 22:48+0200\n"
"PO-Revision-Date: 2005-11-05 18:03+0100\n"
"Last-Translator: Davide Madrisan <davide.madrisan@gmail.com>\n"
"Language-Team: Italiana <it@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: KBabel 1.10.2\n"
# plugins/pck-update
msgid "this script requires bash version 3 or better"
msgstr "questo script richiede bash versione 3 o superiore"
msgid "you're running $me as root"
msgstr "stai eseguendo $me come root"
msgid "library not found"
msgstr "libreria non trovata"
msgid ""
"This program is free software; you can redistribute it and/or modify it under\n"
"the terms of the GNU General Public License version 2 as published by the\n"
"Free Software Foundation. There is NO warranty; not even for MERCHANTABILITY\n"
"or FITNESS FOR A PARTICULAR PURPOSE."
msgstr ""
"Questo è software libero; è possibile redistribuirlo e/o modificarlo nei termini\n"
"della GNU General Public License versione 2 così come pubblicata dalla\n"
"Free Software Foundation. Non è fornita ALCUNA garanzia; neppure di NEGOZIABILITA'\n"
"o di APPLICABILITA' PER UN PARTICOLARE SCOPO."
msgid "Update the package <pck> to version <ver> and release <rel>"
msgstr "Aggiorna il pacchetto <pck> a versione <ver> e release <rel>"
msgid "Usage"
msgstr "Utilizzo"
msgid "where the above options mean"
msgstr "dove le precedenti opzioni significano"
msgid "Do the actions specified in the comma separated list <lst>"
msgstr "Esegue la lista di azioni separate da virgole <lst>"
msgid "check for available versions in the $DISTRO repositories"
msgstr "cerca se il pacchetto è disponibile nei repository $DISTRO"
msgid "download and install the srpm package"
msgstr "download ed installazione del pacchetto srpm"
msgid "check if a new version is available"
msgstr "controlla se è disponibile un aggiornamento"
msgid "download new source files"
msgstr "download dei nuovi file sorgente"
msgid "update and check the specfile"
msgstr "aggiornamento e controllo dello specfile"
msgid "build the rpm(s) and srpm packages"
msgstr "creazione dei pacchetti rpm e srpm"
msgid "build the list of the build requirements"
msgstr "creazione della lista dei build requirement"
msgid "simulate the installation of the rpm package(s)"
msgstr "simulazione dell'installazione dei pacchetti rpm"
msgid "perform some quality and security checks"
msgstr "esecuzione dei test di qualità e sicurezza"
msgid "calculate the md5/sha1 hashing values"
msgstr "calcolo dei valori di hashing md5 e sha1"
msgid "upload the new packages to the ftp repository"
msgstr "upload dei nuovi pacchetti sul sito ftp"
msgid "*remove* old packages from the ftp repository"
msgstr "*rimozione* dei vecchi pacchetti dal sito ftp"
msgid "(move packages to \\`\\$ftp_rw_old_dir', if set)"
msgstr "(backup in \\`\\$ftp_rw_old_dir', se definita)"
msgid "install the new rpm packages"
msgstr "installazione dei nuovi pacchetti rpm"
msgid "Force the update of the rpm(s) and srpm packages"
msgstr "Forza l'aggiornamento dei pacchetti rpm e srpm"
msgid "Force the rebuild of the rpm(s) and srpm packages"
msgstr "Ricrea comunque i pacchetti rpm e srpm"
msgid "Install the new packages even if rpm complains for errors"
msgstr "Installa i nuovi pacchetti anche in caso di errori rpm"
msgid "Download the source files even if found in SOURCE"
msgstr "Scarica i file sorgente anche se presenti in SOURCE"
msgid "Try to execute the given action(s) bypassing errors"
msgstr "Cerca di eseguire comunque le azioni specificate"
msgid "Skip the given test number(s)"
msgstr "Non esegue i test indicati"
msgid "Define variables <v1>,<v2>,... with values <r1>,<r2>,..."
msgstr "Assegna alle variabili v1,v2,... i valori r1,r2,..."
msgid "Select a server from where to download srpm packages"
msgstr "Server da utilizzare nel download dei pacchetti"
msgid "Select a server where to upload packages"
msgstr "Server dove effettuare l'upload dei pacchetti"
msgid "Select a server to be used for both download and upload"
msgstr "Server per l'upload e il download dei pacchetti"
msgid "FTP user (usr) and password (pswd) for packages upload"
msgstr "User (usr) e password (pswd) per l'upload sul sito FTP"
msgid "Name of the specfile (default: <name>.spec)"
msgstr "Nome dello specfile (default: <name>.spec)"
msgid "Force the architecture to a given value"
msgstr "Forza un valore per l'architettura"
msgid "Set change information for the package"
msgstr "Scrive il messaggio indicato nel changelog del pacchetto"
msgid "action"
msgstr "azione"
msgid "Only build the rpm packages"
msgstr "Crea soltanto i pacchetti rpm"
msgid "Do not upload the srpm package"
msgstr "Non effettua l'upload del pacchetto srpm"
msgid "Only build the srpm package"
msgstr "Crea soltanto il pacchetto srpm"
msgid "Do not upload the rpm packages"
msgstr "Non effettua l'upload dei pacchetti rpm"
msgid "Do a \\`list check'"
msgstr "Cerca i file non pacchettizzati"
msgid "Replace the block AUTOBUILDREQ"
msgstr "Aggiorna il blocco AUTOBUILDREQ"
msgid "Remove all the temporary files except (s)rpm packages"
msgstr "Rimuove tutti i file temporanei"
msgid "Enable specfile autoformatting"
msgstr "Abilita la riformattazione dello specfile"
msgid "Unable logging to file (logging dir: \\`\\$logging_dir')"
msgstr "Abilita il log su file (nella directory: \\`\\$logging_dir'"
msgid "Enable rebuilding mode and settings (action 4 only)"
msgstr "Attiva modalità ed impostazioni di rebuild (azione 4)"
msgid "Specify an alternative root directory to rpm"
msgstr "Definisce una root directory alternativa per rpm"
msgid "Use an alternate user configuration file"
msgstr "Definisce uno o più file di configurazione utente alternativi"
msgid "Default files:"
msgstr "File di default:"
msgid "Default user files:"
msgstr "File di default utente:"
msgid "Operation modes"
msgstr "Modalità operative"
msgid "Print this help, then exit"
msgstr "Stampa questa schermata di aiuto e termina il programma"
msgid "Print version number, then exit"
msgstr "Stampa il numero di versione e termina il programma"
msgid "Run in quiet mode"
msgstr "Non stampa alcun dettaglio delle operazioni in esecuzione"
msgid "Select the theme to be used for the colorized output"
msgstr "Seleziona il tema da usare per generare l'output colorato"
msgid "Run in debugging mode (very verbose output)"
msgstr "Attiva la modalità di debugging (output prolisso)"
msgid "Samples"
msgstr "Alcuni esempi"
msgid "changelog entry"
msgstr "stringa di changelog"
msgid "Report bugs to <davide.madrisan@gmail.com>."
msgstr "Segnalare eventuali bug a <davide.madrisan@gmail.com>."
msgid "cannot read"
msgstr "impossibile leggere"
msgid "no such file or directory"
msgstr "file o cartella non trovata"
msgid "unrecognized option"
msgstr "opzione non conosciuta"
msgid "utility not found"
msgstr "programma non trovato"
msgid "must be set in the configuration file"
msgstr "non inizializzato nei file di configurazione"
msgid "must have the same size"
msgstr "devono avere la stessa dimensione"
msgid "illegal value"
msgstr "valore non valido"
msgid "assuming as specfile"
msgstr "assumo che lo specfile sia"
msgid "unsupported path for specfile"
msgstr "persorso dello specfile non supportato"
msgid "specfile not found"
msgstr "specfile non trovato"
msgid "(bug)"
msgstr "(bug)"
msgid "missing mandatory arg"
msgstr "parametro mancante"
msgid "release number: unsupported format"
msgstr "numero di release: formato non supportato"
msgid "new release \\`$pck_newrel' must be greater than current one \\`$SPEC_RELEASE'"
msgstr "la nuova release \\`$pck_newrel' deve essere maggiore di quella corrente \\`$SPEC_RELEASE'"
msgid "checking"
msgstr "sto controllando"
msgid "running test"
msgstr "esecuzione test"
msgid "skipped"
msgstr "ignorato"
msgid "does not point to a valid internet address"
msgstr "non fa riferimento ad un indirizzo internet"
msgid "not a standard structure (see config file)"
msgstr "nome con struttura non standard (vedi configurazione)"
msgid "found \\`-D' and/or \\`-T' option(s) in the \\`%setup' directive"
msgstr "sospetta opzione \\`-D' e/o \\`-T' nella direttiva \\`%setup'"
msgid "missing at least one \\`%defattr' directive"
msgstr "manca almeno una direttiva \\`%defattr'"
msgid "use rpm macros if possible:"
msgstr "utilizzare le macro rpm quando possibile:"
msgid "localization files must be packaged via \\`%find_lang'"
msgstr "trovati file di localizzazione non gestiti da \\`%find_lang'"
msgid "Hint"
msgstr "Suggerimento"
msgid "info pages"
msgstr "pagine info"
msgid "info pages are not installed/uninstalled in the correct way"
msgstr "le pagine info non vengono installate/disinstallate correttamente"
msgid "package Groups"
msgstr "campi Group dei pacchetti"
msgid "invalid \\`Group'"
msgstr "\\`Group' non valido"
msgid "see configuration files"
msgstr "guarda nei file di configurazione"
msgid "or enter the command"
msgstr "oppure esegui il comando"
msgid "approved License"
msgstr "Licenza valida"
msgid "not approved \\`License'"
msgstr "\\`License' non approvata"
msgid "illegal value for arg"
msgstr "valore non valido per l'argomento"
msgid "\\`getopt' error"
msgstr "errore in \\`getopt'"
msgid "\\`getopt' error: bad command \\`$1'"
msgstr "errore in \\`getopt': comando errato \\`$1'"
msgid "can't create temporary files"
msgstr "impossibile creare file temporanei"
msgid "can't create temporary directory"
msgstr "impossibile creare la cartella temporanea"
msgid "command line architecture ignored, using:"
msgstr "ignoro l'architettura indicata ed uso:"
msgid "unsupported architecture"
msgstr "architettura non supportata"
msgid "missing package name"
msgstr "nome del pacchetto mancante"
msgid "cannot create logging directory"
msgstr "impossibile creare la directory di logging"
msgid "logging file"
msgstr "file di log"
msgid "cannot evaluate:"
msgstr "impossibile valutare:"
msgid "no action specified: set with \\`--action'"
msgstr "nessuna azione specificata: utilizzare \\`--action'"
msgid "sintax error in --action \\`$4'"
msgstr "errore di instassi in --action \\`$4'"
msgid "sintax error in the command"
msgstr "errore di sintassi nel comando"
msgid "updating package ${NOTE}${pck_name##*/}${NORM} to version ${NOTE}${pck_newver:-[?]}${NORM}"
msgstr "aggiornamento del pacchetto ${NOTE}${pck_name##*/}${NORM} alla versione ${NOTE}${pck_newver:-[?]}${NORM}"
msgid "updating package"
msgstr "aggiornamento del pacchetto"
msgid "multiple package update (regexp: ${NOTE}$pck_name${NORM}) to version ${NOTE}${pck_newver}${NORM}"
msgstr "aggiornamento multiplo di pacchetti (${NOTE}$pck_name${NORM}) alla versione ${NOTE}${pck_newver}${NORM}"
msgid "multiple package update (regexp: ${NOTE}$pck_name${NORM})"
msgstr "aggiornamento multiplo di pacchetti (${NOTE}$pck_name${NORM})"
msgid "too many packages found"
msgstr "trovati troppi pacchetti candidati"
msgid "several occurrences found"
msgstr "trovati diversi pacchetti candidati"
msgid "Repository"
msgstr "Archivio"
msgid "Package"
msgstr "Pacchetto"
msgid "cannot find a matching SRPM package in the given repositories"
msgstr "impossibile trovare il pacchetto SRPM nei repository indicati"
msgid "downloading"
msgstr "download di"
msgid "got from"
msgstr "scaricato da"
msgid "cannot download"
msgstr "impossibile scaricare"
msgid "installing"
msgstr "installazione di"
msgid "making a ${NOTE}backup copy${NORM} of the current specfile"
msgstr "creazione di una ${NOTE}copia di backup${NORM} dello specfile corrente"
msgid "an error occurred while installing \\`$got_SPEC_FILENAME'"
msgstr "si è verificato un errore installando \\`$got_SPEC_FILENAME'"
msgid "version for new package required"
msgstr "versione del nuovo pacchetto non indicata"
msgid "check the specfile for common mistakes"
msgstr "controllo dello specfile alla ricerca di comuni errori"
msgid "${NOTE}updating${NORM} the new specfile \\`${NOTE}$spec_dir/$SRPM_SPECFILE${NORM}'"
msgstr "${NOTE}aggiornamento${NORM} del nuovo specfile \\`${NOTE}$spec_dir/$SRPM_SPECFILE${NORM}'"
msgid "specfile autoformattig enabled"
msgstr "formattazione automatica dello specfile abilitata"
msgid "illegal \\`format_extra_rules' (see configuration file(s))"
msgstr "\\`format_extra_rules' non corretta (vedi file di configurazione)"
msgid "missing entry forced"
msgstr "aggiunta voce mancante"
msgid "missing entry in the specfile:"
msgstr "voce mancante nello specfile:"
msgid "FIXME: sorry, not implemented yet..."
msgstr "FIXME: spiacente, implementazione mancante..."
msgid "\\`%description' has empty body"
msgstr "trovata \\`%description' senza testo"
msgid "parsing the \\`%package' block"
msgstr "parsing del blocco \\`%package'"
msgid "cannot create \\`$spec_dir/$SRPM_SPECFILE'"
msgstr "impossibile creare \\`$spec_dir/$SRPM_SPECFILE'"
msgid "build the srpm package"
msgstr "crea il pacchetto srpm"
msgid "LD_LIBRARY_PATH is set"
msgstr "LD_LIBRARY_PATH è definita"
msgid "PYTHONDONTWRITEBYTECODE is set"
msgstr "PYTHONDONTWRITEBYTECODE è definita"
msgid "the version entered at command line doesn't match the version set in the specfile"
msgstr "versione specificata a linea di comando differente da quanto indicato nello specfile"
msgid "the release entered at command line doesn't match the release set in the specfile"
msgstr "release specificata a linea di comando differente da quato indicato nello specfile"
msgid "building the rpm packages"
msgstr "creazione dei pacchetti rpm"
msgid "specfile is newer than rpm package(s) (according to modification date)"
msgstr "lo specfile è più recente del/dei pacchetto/i rpm"
msgid "building the srpm package"
msgstr "creazione del pacchetto srpm"
msgid "specfile is newer than srpm (according to modification date)"
msgstr "lo specfile è più recente del file srpm"
msgid "checking for unpackaged files"
msgstr "ricerca di file non inseriti nei blocchi %files"
msgid "build requirement found"
msgstr "trovato build requirement"
msgid "installing missing build requirement"
msgstr "installazione del \"build requirement\""
msgid "cannot install the needed build requirements"
msgstr "impossibile installare i \"build requirement\" necessari"
msgid "found ${NOTE}missing BuildRequirement${NORM} \\`${NOTE}$f${NORM}'"
msgstr "trovato ${NOTE}BuildRequirement non soddisfatto${NORM} \\`${NOTE}$f${NORM}'"
msgid "testing out specfile"
msgstr "esecuzione dei test sullo specfile"
msgid "rpmbuild exited with error code"
msgstr "rpmbuild è terminato con il codice d'errore"
msgid "building rpm and srpm packages"
msgstr "creazione dei pacchetti rpm e srpm"
msgid "release for new package required"
msgstr "release del nuovo pacchetto non indicata"
msgid "package not found"
msgstr "pacchetto non trovato"
msgid "ignoring requirement"
msgstr "requirement ignorato"
msgid "rpm exited with error code:"
msgstr "rpm è terminato con il codice di errore:"
msgid "cannot extract files from rpm archive"
msgstr "impossibile estrarre i file dall'archivio rpm"
msgid "cannot extract files from cpio archive"
msgstr "impossibile estrarre i file dall'archivio cpio"
msgid "server unreachable"
msgstr "server non raggiungibile"
msgid "you have no read write access to url#$ftp_server_upload_num"
msgstr "accesso in scrittura alla url#$ftp_server_upload_num vietato"
msgid "unset in the configuration files"
msgstr "non configurato nei file di configurazione"
msgid "ftp upload has been disabled"
msgstr "l'upload dei pacchetti via ftp è stato disabilitato"
msgid "trying with the ${NOTE}anonymous login${NORM}"
msgstr "provo ad utilizzare un ${NOTE}login anonimo${NORM}"
msgid "no old packages have been found."
msgstr "non sono stati trovati vecchi pacchetti."
msgid "moving old packages to the remote backup folder"
msgstr "sposto i vecchi pacchetti nella directory di backup del repository"
msgid "removing old packages from the repository"
msgstr "rimozione dei vecchi pacchetti dal sito"
msgid "force enabled"
msgstr "forzata"
msgid "cannot install the new rpm packages"
msgstr "impossibile installare i pacchetti rpm"
msgid "unknown step \\`$step'"
msgstr "lo step \\`$step' non esiste"
msgid "cleaning up temporary files"
msgstr "eliminazione dei file temporanei"
msgid "removing source packages and patches, if any"
msgstr "rimozione dei pacchetti sorgente e delle patch, se presenti"
msgid "removing"
msgstr "rimozione di"
msgid "It seems good but do not forget to run quality and security tests"
msgstr "Sembra ok ma non dimenticare di eseguire i test di qualità e sicurezza"
msgid "Add the following files in the right %files blocks"
msgstr "Smistare i seguenti file nelle sezioni %files corrispondenti"
msgid "specfile with CRLF line terminators"
msgstr "specfile con fine linea CRLF"
msgid "specfile with CR line terminators"
msgstr "specfile con fine linea CR"
msgid "specfile with an unsupported format"
msgstr "specfile in formato non supportato"
msgid "checking the specfile for common mistakes"
msgstr "controllo dello specfile alla ricerca di comuni errori"
msgid "checking packages for common mistakes"
msgstr "controllo dei pacchetti alla ricerca di comuni errori"
msgid "replacing the AUTOBUILDREQ block by:"
msgstr "sostituzione del blocco AUTOBUILDREQ con:"

View File

@ -1,240 +0,0 @@
# translation of it.po to Italiana
# Copyright (C) 2004-2008,2012 Davide Madrisan
# Davide Madrisan <davide.madrisan@gmail.com>
msgid ""
msgstr ""
"Project-Id-Version: it\n"
"POT-Creation-Date: 2004-09-01 22:48+0200\n"
"PO-Revision-Date: 2005-11-05 18:03+0100\n"
"Last-Translator: Davide Madrisan <davide.madrisan@gmail.com>\n"
"Language-Team: Italiana <it@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: KBabel 1.10.2\n"
msgid "this script requires bash version 3 or better"
msgstr "questo script richiede bash versione 3 o superiore"
msgid "library not found"
msgstr "libreria non trovata"
msgid ""
"This program is free software; you can redistribute it and/or modify it under\n"
"the terms of the GNU General Public License version 2 as published by the\n"
"Free Software Foundation. There is NO warranty; not even for MERCHANTABILITY\n"
"or FITNESS FOR A PARTICULAR PURPOSE."
msgstr ""
"Questo è software libero; è possibile redistribuirlo e/o modificarlo nei termini\n"
"della GNU General Public License versione 2 così come pubblicata dalla\n"
"Free Software Foundation. Non è fornita ALCUNA garanzia; neppure di NEGOZIABILITA'\n"
"o di APPLICABILITA' PER UN PARTICOLARE SCOPO."
msgid "Try to create a specfile for the specified source archive"
msgstr "Cerca di creare uno specfile per l'archivio sorgente indicato"
msgid "Usage"
msgstr "Utilizzo"
msgid "message"
msgstr "messaggio"
msgid "git-opts"
msgstr "opzioni-git"
msgid "where the above options mean"
msgstr "dove le precedenti opzioni significano"
msgid "Name of the package (default: taken from <source-archive> name)"
msgstr "Nome del pacchetto (default: ricavato dal nome dell'archivio sorgente)"
msgid "Version of the package (default: taken from <source-archive> name)"
msgstr "Versione del pacchetto (default: ricavato dal nome dell'archivio sorgente)"
msgid "Typology of the specfile to be created"
msgstr "Categoria dello specfile da generare"
msgid "standard specfile (default)"
msgstr "specfile standard (default)"
msgid "specfile for gnome packages"
msgstr "specfile per pacchetti gnome"
msgid "specfile for kde3 packages"
msgstr "specfile per pacchetti kde3"
msgid "specfile for kde4 packages"
msgstr "specfile per pacchetti kde4"
msgid "specfile for common library packages"
msgstr "specfile per librerie"
msgid "specfile for single-package perl modules"
msgstr "specfile per singoli moduli perl"
msgid "specfile for python modules"
msgstr "specfile per moduli python"
msgid "standard specfile for system/network services"
msgstr "specfile per servizi di sistema/rete"
msgid "Redirect the output to the file <outfile>"
msgstr "Redirige lo standard output sul file <outfile>"
msgid "Specify a git branch"
msgstr "Specifica un branch git"
msgid "Do not remove git files"
msgstr "Non rimuove i file git"
msgid "Use an alternate user configuration file"
msgstr "Definisce uno o più file di configurazione utente alternativi"
msgid "Default files:"
msgstr "File di default:"
msgid "Default user files:"
msgstr "File di default utente:"
msgid "Operation modes"
msgstr "Modalità operative"
msgid "Print this help, then exit"
msgstr "Stampa questa schermata di aiuto e termina il programma"
msgid "Print version number, then exit"
msgstr "Stampa il numero di versione e termina il programma"
msgid "Run in quiet mode"
msgstr "Non stampa alcun dettaglio delle operazioni in esecuzione"
msgid "Run in debugging mode (very verbose output)"
msgstr "Attiva la modalità di debugging (output prolisso)"
msgid "Samples"
msgstr "Alcuni esempi"
msgid "Set change information for the package"
msgstr "Scrive il messaggio indicato nel changelog del pacchetto"
msgid "Report bugs to <davide.madrisan@gmail.com>."
msgstr "Segnalare eventuali bug a <davide.madrisan@gmail.com>."
msgid "cannot read"
msgstr "impossibile leggere"
msgid "unrecognized option"
msgstr "opzione non conosciuta"
msgid "utility not found"
msgstr "programma non trovato"
msgid "info-page"
msgstr "pagina-info"
msgid "(bug)"
msgstr "(bug)"
msgid "illegal arg#1 for \\`$FUNCNAME'"
msgstr "argomento #1 per \\`$FUNCNAME' non lecito"
msgid "missing arg#2 in \\`$FUNCNAME $1'"
msgstr "argomento #2 in \\`$FUNCNAME $1' mancante"
msgid "unknown build techonology"
msgstr "tecnologia di build sconosciuta"
msgid "file not found"
msgstr "file non trovato"
msgid "remember to modify the value for \\`${NOTE}$id${NORM}'"
msgstr "ricordarsi di modificare il valore di \\`${NOTE}$id${NORM}'"
msgid "FIXME: sorry, not implemented yet..."
msgstr "FIXME: spiacente, implementazione mancante..."
msgid "(see $templatedir)"
msgstr "(si veda $templatedir)"
msgid "unknown specfile --type"
msgstr "\\`--type' indicato sconosciuto"
msgid "skipped"
msgstr "ignorato"
msgid "cannot download"
msgstr "impossibile scaricare"
msgid "unsupported protocol"
msgstr "protocollo non supportato"
msgid "missing tarball name"
msgstr "manca il nome del tarball"
msgid "cannot find the package $pck_tarball"
msgstr "impossibile trovare il pacchetto $pck_tarball"
msgid "cannot get the package name, use the \\`-n' option"
msgstr "impossibile ricavare il nome del pacchetto, usa l'opzione \\`-n'"
msgid "invalid version number"
msgstr "numero di versione non valido"
msgid "cannot get the package version, use the \\`-v' option"
msgstr "impossibile ricavare la versione del pacchetto, usa l'opzione \\`-v'"
msgid "output file"
msgstr "file di output"
msgid "can't create output file"
msgstr "impossibile creare il file di output"
msgid "generating specfile"
msgstr "generazione dello specfile"
msgid "source"
msgstr "sorgente"
msgid "mode"
msgstr "modo"
msgid "libraries must have this name structure (use \\`-n'):"
msgstr "i nomi delle librerie devono avere questa struttura (usare \\`-n'):"
msgid "perl modules must have this name structure (use \\`-n'):"
msgstr "i nomi dei moduli perl devono avere questa struttura (usare \\`-n'):"
msgid "python modules must have this name structure (use \\`-n'):"
msgstr "i nomi dei moduli python devono avere questa struttura (usare \\`-n'):"
msgid "can't create temporary directory"
msgstr "impossibile creare directory temporanee"
msgid "unsupported package compression method"
msgstr "metodo di compressione del pacchetto non supportato"
msgid "neither \\`Makefile' nor \\`Makefile.in' has been found"
msgstr "\\`Makefile' e \\`Makefile.in' non trovati"
msgid "looks like a perl package (use \\`-t perl' if this is true)"
msgstr "sembra un pacchetto perl (in questo caso usa \\`-t perl')"
msgid "looks like a python module (use \\`-t python' if this is true)"
msgstr "sembra un modulo python (in questo caso usa \\`-t python')"
msgid "created specfile"
msgstr "creato specfile"
msgid "line"
msgstr "linea"
msgid "too many nested @if blocks"
msgstr "troppi livelli di blocchi @if"
msgid "@else without @if statement"
msgstr "@else senza un corrispondente @if"
msgid "@fi without @if statement"
msgstr "@fi senza un corrispondente @if"

View File

@ -1,76 +0,0 @@
# translation of it.po to Italiana
# Copyright (C) 2012 Davide Madrisan
# Davide Madrisan <davide.madrisan@gmail.com>
msgid ""
msgstr ""
"Project-Id-Version: it\n"
"POT-Creation-Date: 2012-05-19 22:14+0200\n"
"PO-Revision-Date: 2012-05-19 22:14+0200\n"
"Last-Translator: Davide Madrisan <davide.madrisan@gmail.com>\n"
"Language-Team: Italiana <it@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
# lib/libtest
msgid "check the specfile for common mistakes"
msgstr "controllo dello specfile alla ricerca di comuni errori"
msgid "missing mandatory arg"
msgstr "parametro mancante"
msgid "checking"
msgstr "sto controllando"
msgid "running test"
msgstr "esecuzione test"
msgid "does not point to a valid internet address"
msgstr "non fa riferimento ad un indirizzo internet"
msgid "not a standard structure (see config file)"
msgstr "nome con struttura non standard (vedi configurazione)"
msgid "found \\`-D' and/or \\`-T' option(s) in the \\`%setup' directive"
msgstr "sospetta opzione \\`-D' e/o \\`-T' nella direttiva \\`%setup'"
msgid "missing at least one \\`%defattr' directive"
msgstr "manca almeno una direttiva \\`%defattr'"
msgid "use rpm macros if possible:"
msgstr "utilizzare le macro rpm quando possibile:"
msgid "localization files must be packaged via \\`%find_lang'"
msgstr "trovati file di localizzazione non gestiti da \\`%find_lang'"
msgid "Hint"
msgstr "Suggerimento"
msgid "info pages"
msgstr "pagine info"
msgid "info pages are not installed/uninstalled in the correct way"
msgstr "le pagine info non vengono installate/disinstallate correttamente"
msgid "package Groups"
msgstr "campi Group dei pacchetti"
msgid "invalid \\`Group'"
msgstr "\\`Group' non valido"
msgid "see configuration files"
msgstr "guarda nei file di configurazione"
msgid "or enter the command"
msgstr "oppure esegui il comando"
msgid "approved License"
msgstr "Licenza valida"
msgid "not approved \\`License'"
msgstr "\\`License' non approvata"
msgid "${NOTE}Specfile checks: ${NORM}${WARN}$total_issues${NORM} ${NOTE}warnings.${NORM}"
msgstr "${NOTE}Controllo dello specfile: problemi riscontrati: ${NORM}${WARN}$total_issues${NORM}"

View File

@ -1,123 +0,0 @@
# translation of it.po to Italiana
# Copyright (C) 2008,2012 Davide Madrisan
# Davide Madrisan <davide.madrisan@gmail.com>
msgid ""
msgstr ""
"Project-Id-Version: it\n"
"POT-Creation-Date: 2008-10-28 22:00+0100\n"
"PO-Revision-Date: 2008-10-28 22:03+0100\n"
"Last-Translator: Davide Madrisan <davide.madrisan@gmail.com>\n"
"Language-Team: Italiana <it@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: KBabel 1.10.2\n"
# tests/pkg_security_test_001
msgid "this script requires bash version 2 or better"
msgstr "questo script richiede bash versione 2 o superiore"
msgid "library not found"
msgstr "libreria non trovata"
msgid "utility not found"
msgstr "programma non trovato"
msgid "performing quality checks"
msgstr "esecuzione dei test di qualità"
msgid "\\`getopt' error"
msgstr "errore in \\`getopt'"
msgid "(bug)"
msgstr "(bug)"
msgid "missing mandatory arg"
msgstr "parametro mancante"
msgid "cannot read"
msgstr "impossibile leggere"
msgid "no such file or directory"
msgstr "file o cartella non trovata"
msgid "checking for wrong symbolic links"
msgstr "ricerca di link simbolici errati"
msgid "empty string"
msgstr "stringa vuota"
msgid "checking"
msgstr "controllo"
msgid "checking for \\`$SPEC_BUILDROOT' (%buildroot) strings"
msgstr "ricerca della stringa \\`$SPEC_BUILDROOT' (%buildroot)"
msgid "checking for %buildroot strings"
msgstr "ricerca delle stringhe %buildroot"
msgid "N/A"
msgstr "N/A"
msgid "skipped"
msgstr "ignorato"
msgid "checking for \\`$BUILDDIR' (%_builddir) strings"
msgstr "ricerca della stringa \\`$BUILDDIR' (%_builddir)"
msgid "mime type:"
msgstr "tipo mime:"
msgid "checking for suspicious plugins in devel packages"
msgstr "controllo di plugin sospetti nei pacchetti devel"
msgid "found suspect plugin \\`${NOTE}$f${NORM}'"
msgstr "trovato sospetto plugin \\`${NOTE}$f${NORM}'"
msgid "checking for wrong file attributes in bin and lib directories"
msgstr "ricerca di file binari e librerie con permessi errati"
msgid "found suspect file"
msgstr "file sospetto"
msgid "Hint"
msgstr "Suggerimento"
msgid "checking for libraries with undefined symbols after relocation"
msgstr "ricerca di librerie con simboli indefiniti dopo rilocazione"
msgid "checking for binary files installed in /etc (see FHS)"
msgstr "ricerca di file binari installati in /etc (vedi FHS)"
msgid "checking if the info catalog is updated when necessary"
msgstr "controllo se il registro delle pagine info viene aggiornato"
msgid "info pages should be installed/uninstalled"
msgstr "le pagine info dovrebbero essere installate/disinstallate"
msgid "checking packages for wrong user and/or group ownerships"
msgstr "ricerca di pacchetti contenenti file con errato utente e/o gruppo"
msgid "package not found"
msgstr "pacchetto non trovato"
msgid "checking packages for desktop files installed in the applnk dir"
msgstr "ricerca di pacchetti con file desktop installati in applnk"
msgid "create desktop files for:"
msgstr "creare file desktop per:"
msgid "see:"
msgstr "vedere:"
msgid "checking for packages with bad BuildArch tag"
msgstr "ricerca di pacchetti con errato tag BuildArch"
msgid "this package should be tagged \\`noarch'"
msgstr "questo pacchetto dovrebbe essere di tipo \\`noarch'"
msgid "${NOTE}Quality checks: ${#rpmpkg_name[@]} package(s) checked: ${NORM}${WARN}$total_issues${NORM}${NOTE} warning(s).${NORM}"
msgstr "${NOTE}Controlli di qualità: pacchetti rpm: ${#rpmpkg_name[@]}; problemi riscontrati: ${NORM}${WARN}$total_issues${NORM}"

View File

@ -1,68 +0,0 @@
# translation of it.po to Italiana
# Copyright (C) 2008,2012 Davide Madrisan
# Davide Madrisan <davide.madrisan@gmail.com>
msgid ""
msgstr ""
"Project-Id-Version: it\n"
"POT-Creation-Date: 2008-10-28 22:00+0100\n"
"PO-Revision-Date: 2008-10-28 22:03+0100\n"
"Last-Translator: Davide Madrisan <davide.madrisan@gmail.com>\n"
"Language-Team: Italiana <it@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: KBabel 1.10.2\n"
# tests/pkg_security_test_001
msgid "this script requires bash version 2 or better"
msgstr "questo script richiede bash versione 2 o superiore"
msgid "library not found"
msgstr "libreria non trovata"
msgid "performing security checks"
msgstr "esecuzione dei test di sicurezza"
msgid "\\`getopt' error"
msgstr "errore in \\`getopt'"
msgid "(bug)"
msgstr "(bug)"
msgid "missing mandatory arg"
msgstr "parametro mancante"
msgid "cannot read"
msgstr "impossibile leggere"
msgid "no such file or directory"
msgstr "file o cartella non trovata"
msgid "checking for RPATH vulnerabilities"
msgstr "ricerca di vulnerabilità di tipo RPATH"
msgid "checking"
msgstr "controllo"
msgid "checking for setuid binaries"
msgstr "ricerca di binari setuid"
msgid "checking for setgid directories"
msgstr "ricerca di directory setgid"
msgid "checking for unsecure use of \\`\\$\\$' in shell and perl scripts"
msgstr "ricerca di script shell e perl che utilizzano \\`\\$\\$' in modo insicuro"
msgid "seems to be affected"
msgstr "sembra affetto"
msgid "Hint for bash scripts (\\`mktemp' required)"
msgstr "Suggerimento per script bash (richiede \\`mktemp')"
msgid "Hint for perl scripts"
msgstr "Suggerimento per script perl"
msgid "${NOTE}Security checks: ${#rpmpkg_name[@]} package(s) checked: ${NORM}${WARN}$total_issues${NORM}${NOTE} warning(s).${NORM}"
msgstr "${NOTE}Controlli di sicurezza: pacchetti rpm: ${#rpmpkg_name[@]}; problemi riscontrati: ${NORM}${WARN}$total_issues${NORM}"

View File

@ -1,5 +1,5 @@
# Makefile for autospec
# Copyright (C) 2008,2011 by Davide Madrisan <davide.madrisan@gmail.com>
# Copyright (C) 2008,2011,2013,2015 by Davide Madrisan <davide.madrisan@gmail.com>
# This program is free software; you can redistribute it and/or modify it under
# the terms of version 2 of the GNU General Public License as published by the
@ -18,7 +18,7 @@ srcdir = ..
include $(srcdir)/Makefile.env
pck_templates := gnome kde3 kde4 library perl python standard standard-daemon
pck_templates := ghc gnome kde5 kf6 library ocaml-libs perl perl-build python python-setuptools standard standard-daemon web
all:

82
templates/ghc Normal file
View File

@ -0,0 +1,82 @@
%define ghc_ver %(ghc --numeric-version)
%define pkg_name %(echo %name | sed "s|^ghc-||")
Name: @pck_name@
Version: @pck_version@
Release: @spec_first_release@@DISTRO_rpm@
Summary: GHC ...
Group: Development/Libraries
Vendor: @VENDOR@
Distribution: @DISTRO@
Packager: @packager_fullname@ <@packager_email@>
URL: https://hackage.haskell.org/package/%{pkg_name}
Source: https://hackage.haskell.org/package/%{pkg_name}-%{version}/%{pkg_name}-%{version}.tar.gz
License: BSD
## AUTOBUILDREQ-BEGIN
## AUTOBUILDREQ-END
@if:buildrequires_buildtool
BuildRequires: @build_tool@
@fi:buildrequires_buildtool
@if:infopages
Requires(post): %{__install_info}
Requires(preun): %{__install_info}
@fi:infopages
BuildRequires: ghc
BuildRequires: ghc-rpm-macros
Requires: ghc = %{ghc_ver}
%description
%{summary}.
%package devel
Summary: Haskell %{pkg_name} library development files
Provides: %{name}-static = %{?epoch:%epoch:}%{version}-%{release}
Provides: %{name}-static%{?_isa} = %{?epoch:%epoch:}%{version}-%{release}
%if %{defined ghc_version}
Requires: ghc = %{ghc_version}
%endif
Requires: %{name}%{?_isa} = %{?epoch:%epoch:}%{version}-%{release}
%description devel
This package provides the Haskell %{pkg_name} library development files.
%if %{with haddock}
%package doc
Summary: Haskell %{pkg_name} library documentation
Requires: ghc-filesystem
%description doc
This package provides the Haskell %{pkg_name} library documentation.
%endif
%prep
%setup -q -n %{pkgname}-%{version}
%build
%ghc_lib_build
%install
%ghc_lib_install
rm -f %{buildroot}%{_ghclicensedir}/%{name}/LICENSE
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%files -f %{name}.files
%defattr(-,root,root)
%license LICENSE
%files devel -f %{name}-devel.files
%defattr(-,root,root)
#%doc CHANGELOG.markdown README.markdown
%if %{with haddock}
%files doc -f %{name}-doc.files
%defattr(-,root,root)
%license LICENSE
%endif
%changelog
* @spec_changelog_date@ @packager_fullname@ <@packager_email@> @pck_version@-@spec_first_release@@DISTRO_rpm@
- @spec_changelog_comment@

View File

@ -12,15 +12,13 @@ Group: ...
Vendor: @VENDOR@
Distribution: @DISTRO@
Packager: @packager_fullname@ <@packager_email@>
URL: http://www.gnome.org
# bugfixes: http://ftp.acc.umu.se/pub/GNOME/sources/%{pkgname}-*.tar.bz2
Source: http://ftp.gnome.org/pub/GNOME/%{gnomegroup}/%{gnomemajver}/%{gnomever}/sources/%{pkgname}-%{version}.tar.bz2
URL: https://www.gnome.org
Source: https://download.gnome.org/pub/GNOME/%{gnomegroup}/%{gnomemajver}/%{gnomever}/sources/%{pkgname}-%{version}.tar.bz2
License: GPL
## AUTOBUILDREQ-BEGIN
## note: run 'autospec -u -a6 @pck_name@' to get the list of build requirements.
## AUTOBUILDREQ-END
BuildRequires: gtk-doc
BuildRoot: @rpm_default_buildroot@
%description
...

View File

@ -1,46 +0,0 @@
Name: @pck_name@
Version: @pck_version@
Release: @spec_first_release@@DISTRO_rpm@
Summary: ...
Group: ...
Vendor: @VENDOR@
Distribution: @DISTRO@
Packager: $packager_fullname <$packager_email>
URL: ...
Source: ...
License: ...
## AUTOBUILDREQ-BEGIN
## note: run 'autospec -u -a6 @pck_name@' to get the list of build requirements.
## AUTOBUILDREQ-END
BuildRoot: @rpm_default_buildroot@
%description
...
@if:debug_package
%debug_package
@fi:debug_package
%prep
%setup -q
%build
%configure_kde
%make
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%makeinstall
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%files
%defattr(-,root,root)
@standard_docs@
## note: eventually add the remaining documents (if any)
# @standard_docs_devel@
%changelog
* @spec_changelog_date@ @packager_fullname@ <@packager_email@> @pck_version@-@spec_first_release@@DISTRO_rpm@
- @spec_changelog_comment@

View File

@ -1,141 +0,0 @@
Name: @pck_name@
Version: @pck_version@
Release: @spec_first_release@@DISTRO_rpm@
Summary: ...
Group: ...
Vendor: @VENDOR@
Distribution: @DISTRO@
Packager: @packager_fullname@ <@packager_email@>
URL: http://www.kde.org
Source: ...
License: ...
BuildRequires: automoc4
BuildRequires: cmake
BuildRequires: libqt4-devel
BuildRequires: kdelibs-devel
## AUTOBUILDREQ-BEGIN
## note: run 'autospec -u -a6 @pck_name@' to get the list of build requirements.
## AUTOBUILDREQ-END
Requires: kdelibs%{?_kde4_version: >= %{_kde4_version}}
BuildRoot: @rpm_default_buildroot@
%description
...
## remove the devel blocks if this package does not provide development stuff
%package devel
Group: Development/Libraries
Summary: Development files for %{name}
Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release}
Requires: kdelibs-devel
%description devel
This package contains libraries and header files for developing applications that use %{name}.
@if:debug_package
%debug_package
@fi:debug_package
%prep
%setup -q
%build
%cmake_kde4 -d build
%make
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%makeinstall -C build
@if:i18n
%find_lang %{name} --all-name --with-kde || touch %{name}.lang
@fi:i18n
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%post
@if:shared_libraries
## remove the following line if no dynamic libraries are provided by this package
/sbin/ldconfig
@fi:shared_libraries
@if:icons_mimetypes
## remove the following line if this package has no hicolor icons
touch --no-create %{_kde4_icondir}/hicolor >/dev/null 2>&1
## remove the following line if this package has no oxygen icons
touch --no-create %{_kde4_icondir}/oxygen >/dev/null 2>&1
@fi:icons_mimetypes
exit 0
@if:icons_mimetypes
%posttrans
@if:shared_libraries
## remove the following line if no dynamic libraries are provided by this package
/sbin/ldconfig
@fi:shared_libraries
update-desktop-database -q >/dev/null 2>&1
update-mime-database %{_kde4_mimedir} >/dev/null 2>&1
## remove the following line if this package has no hicolor icons
gtk-update-icon-cache %{_kde4_icondir}/hicolor >/dev/null 2>&1
## remove the following line if this package has no oxygen icons
gtk-update-icon-cache %{_kde4_icondir}/oxygen >/dev/null 2>&1
exit 0
@fi:icons_mimetypes
%postun
@if:shared_libraries
## remove the following line if no dynamic libraries are provided by this package
/sbin/ldconfig
@fi:shared_libraries
@if:icons_mimetypes
if [ $1 -eq 0 ]; then
\ update-desktop-database -q >/dev/null 2>&1
\ update-mime-database %{_kde4_mimedir} >/dev/null 2>&1
## remove the following two lines if this package has no hicolor icons
\ touch --no-create %{_kde4_icondir}/hicolor >/dev/null 2>&1
\ gtk-update-icon-cache %{_kde4_icondir}/hicolor >/dev/null 2>&1
## remove the following two lines if this package has no oxygen icons
\ touch --no-create %{_kde4_icondir}/oxygen >/dev/null 2>&1
\ gtk-update-icon-cache %{_kde4_icondir}/oxygen >/dev/null 2>&1
fi
@fi:icons_mimetypes
exit 0
@if:i18n
%files -f %{name}.lang
@else:i18n
%files
@fi:i18n
%defattr(-,root,root)
## note: this list is just an example; modify as required
# %{_kde4_bindir}/%{name}
# %{_kde4_datadir}/%{name}
# %{_kde4_dbusinterfacesdir}/org.kde.*.xml
# %{_kde4_kcfgdir}/*.kcfg
# %{_kde4_libdir}/kde4/*.so
# %{_kde4_icondir}/hicolor/*/*/*.png
# %{_kde4_icondir}/oxygen/*/*/*.png
# %{_kde4_icondir}/hicolor/scalable/*/*.svgz
# %{_kde4_icondir}/oxygen/scalable/*/*.svgz
# %{_kde4_xdgappsdir}/%{name}.desktop
# %{_kde4_xdgmimedir}/*.xml
# %{_kde4_servicesdir}/*.desktop
# %{_kde4_servicetypesdir}/*.desktop
# %config %{_kde4_configdir}/*.knsrc
# %doc %lang(en) %{_kde4_htmldir}/en/%{name}
## note: "man3" pages normally goes to devel package if any
# %{_mandir}/man?/%{name}.*
@standard_docs@
## note: eventually add the remaining documents (if any)
# @standard_docs_devel@
## remove this block if the package does not provide development stuff
%files devel
%defattr(-,root,root)
## note: this list is just an example; modify as required
# %{_kde4_includedir}/%{name}
# %{_kde4_libdir}/*.so
%changelog
* @spec_changelog_date@ @packager_fullname@ <@packager_email@> @pck_version@-@spec_first_release@@DISTRO_rpm@
- @spec_changelog_comment@

95
templates/kde5 Normal file
View File

@ -0,0 +1,95 @@
%define majver %(echo %version | cut -d. -f1-2)
Name: @pck_name@
Version: @pck_version@
Release: @spec_first_release@@DISTRO_rpm@
Summary: ...
Group: ...
Vendor: @VENDOR@
Distribution: @DISTRO@
Packager: @packager_fullname@ <@packager_email@>
URL: https://kde.org
Source: ...
License: ...
## AUTOBUILDREQ-BEGIN
## note: run 'autospec -u -a6 @pck_name@' to get the list of build requirements.
## AUTOBUILDREQ-END
BuildRequires: cmake
BuildRequires: rpm-macros-kde5
BuildRequires: extra-cmake-modules
Requires: lib%{name} = %{?epoch:%epoch:}%{version}-%{release}
%description
...
## remove the library block if this package does not provide library and development stuff
%package -n lib%{name}
Group: System/Libraries
Summary: Shared libraries for %{name}
%description -n lib%{name}
This package contains shared libraries for %{name}.
%package -n lib%{name}-devel
Group: Development/Libraries
Summary: Development files for %{name}
Requires: lib%{name} = %{?epoch:%epoch:}%{version}-%{release}
%description -n lib%{name}-devel
This package contains libraries and header files for developing applications that use %{name}.
@if:debug_package
%debug_package
@fi:debug_package
%prep
%setup -q
%build
%cmake_kde5 -d build
%make
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%makeinstall -C build
@if:i18n
%find_lang %{name} --with-qt --with-man --with-html --all-name || touch %{name}.lang
@fi:i18n
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
@if:i18n
%files -f %{name}.lang
@else:i18n
%files
@fi:i18n
%defattr(-,root,root)
## note: this list is just an example; modify as required
# %{_kde5_bindir}/%{name}
# %{_kde5_datadir}/%{name}
## note: "man3" pages normally goes to devel package if any
# %{_mandir}/man?/%{name}.*
@standard_docs@
## note: eventually add the remaining documents (if any)
# @standard_docs_devel@
## remove this block if the package does not provide library and development stuff
%files -n lib%{name}
%defattr(-,root,root)
## note: this list is just an example; modify as required
# %{_kde5_libdir}/*.so
%files -n lib%{name}-devel
%defattr(-,root,root)
## note: this list is just an example; modify as required
# %{_kde5_includedir}/<KF5Framework>
# %{_kde5_includedir}/%{name}_version.h
# %{_kde5_libdir}/cmake/<KF5Framework>
# %{_kde5_libdir}/*.so
# %{_kde5_mkspecsdir}/qt_*.pri
%changelog
* @spec_changelog_date@ @packager_fullname@ <@packager_email@> @pck_version@-@spec_first_release@@DISTRO_rpm@
- @spec_changelog_comment@

93
templates/kf6 Normal file
View File

@ -0,0 +1,93 @@
%define framework %(echo %name | sed "s|^kf6-||")
%define majver %(echo %version | cut -d. -f1-2)
Name: @pck_name@
Version: @pck_version@
Release: @spec_first_release@@DISTRO_rpm@
Summary: ...
Group: ...
Vendor: @VENDOR@
Distribution: @DISTRO@
Packager: @packager_fullname@ <@packager_email@>
URL: https://kde.org
Source: ...
License: ...
## AUTOBUILDREQ-BEGIN
## note: run 'autospec -u -a6 @pck_name@' to get the list of build requirements.
## AUTOBUILDREQ-END
BuildRequires: cmake
BuildRequires: kf6-rpm-macros
BuildRequires: extra-cmake-modules
Requires: lib%{name} = %{?epoch:%epoch:}%{version}-%{release}
%description
...
## remove the library block if this package does not provide library and development stuff
%package -n lib%{name}
Group: System/Libraries
Summary: Shared libraries for %{name}
%description -n lib%{name}
This package contains shared libraries for %{name}.
%package -n lib%{name}-devel
Group: Development/Libraries
Summary: Development files for %{name}
Requires: lib%{name} = %{?epoch:%epoch:}%{version}-%{release}
%description -n lib%{name}-devel
This package contains libraries and header files for developing applications that use %{name}.
%prep
%setup -q
%build
%cmake_kf6
%cmake_build
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%cmake_install
@if:i18n
%find_lang %{name} --with-qt --with-man --with-html --all-name || touch %{name}.lang
@fi:i18n
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
@if:i18n
%files -f %{name}.lang
@else:i18n
%files
@fi:i18n
%defattr(-,root,root)
## note: this list is just an example; modify as required
# %{_kde6_bindir}/%{name}
# %{_kde6_datadir}/%{name}
## note: "man3" pages normally goes to devel package if any
# %{_mandir}/man?/%{name}.*
@standard_docs@
## note: eventually add the remaining documents (if any)
# @standard_docs_devel@
## remove this block if the package does not provide library and development stuff
%files -n lib%{name}
%defattr(-,root,root)
## note: this list is just an example; modify as required
# %{_kde6_libdir}/*.so
%files -n lib%{name}-devel
%defattr(-,root,root)
## note: this list is just an example; modify as required
# %{_kde6_includedir}/<KF5Framework>
# %{_kde6_includedir}/%{name}_version.h
# %{_kde6_libdir}/cmake/<KF5Framework>
# %{_kde6_libdir}/*.so
# %{_kde6_mkspecsdir}/qt_*.pri
%changelog
* @spec_changelog_date@ @packager_fullname@ <@packager_email@> @pck_version@-@spec_first_release@@DISTRO_rpm@
- @spec_changelog_comment@

View File

@ -26,7 +26,6 @@ Requires: lib%{name} = %{?epoch:%epoch:}%{version}-%{release}
Requires(post): %{__install_info}
Requires(preun): %{__install_info}
@fi:infopages
BuildRoot: @rpm_default_buildroot@
%description
...
@ -53,8 +52,6 @@ Requires: lib%{name} = %{?epoch:%epoch:}%{version}-%{release}
@else:pck_library
Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release}
@fi:pck_library
## note: you can add this requirement if .pc files are provided by this package
#Requires: pkg-config
@if:pck_library
%description -n lib%{name}-devel
@ -85,10 +82,6 @@ Requires: gtk-doc
This package includes the %{name} API documentation.
@fi:pck_apidocs
@if:debug_package
%debug_package
@fi:debug_package
%prep
%setup -q
@ -111,14 +104,6 @@ This package includes the %{name} API documentation.
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
@if:pck_library
%post -n lib%{name} -p /sbin/ldconfig
%postun -n lib%{name} -p /sbin/ldconfig
@else:pck_library
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
@fi:pck_library
@if:infopages
@if:pck_library
%post -n lib%{name}-devel

74
templates/ocaml-libs Normal file
View File

@ -0,0 +1,74 @@
%define ocamlpck @pck_name_tail@
Name: @pck_name@
Version: @pck_version@
Release: @spec_first_release@@DISTRO_rpm@
Summary: ...
Group: System/Libraries/OCaml
Vendor: @VENDOR@
Distribution: @DISTRO@
Packager: @packager_fullname@ <@packager_email@>
URL: ...
Source: ...
License: ...
## AUTOBUILDREQ-BEGIN
## note: run 'autospec -u -a6 @pck_name@' to get the list of build requirements.
## AUTOBUILDREQ-END
BuildRequires: dune
BuildRequires: ocaml
BuildRequires: ocaml-findlib
%description
%{summary}.
@if:pck_devel
%package devel
Group: Development/Libraries/OCaml
Summary: Development files for %{name}
Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release}
%description devel
This package contains libraries and signature files for developing applications that use %{name}.
@fi:pck_devel
%debug_package
%prep
%setup -q
%build
dune build
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
DESTDIR=%{buildroot} dune install --prefix "%{_prefix}" --libdir "%{_libdir}/ocaml"
rm -rf %{buildroot}/usr/doc
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%files
%defattr(-,root,root)
%dir %{_libdir}/ocaml/%{ocamlpck}
%{_libdir}/ocaml/%{ocamlpck}/*
%exclude %{_libdir}/ocaml/%{ocamlpck}/*.a
%exclude %{_libdir}/ocaml/%{ocamlpck}/*.cmx
%exclude %{_libdir}/ocaml/%{ocamlpck}/*.cmxa
%exclude %{_libdir}/ocaml/%{ocamlpck}/*.mli
%{_libdir}/ocaml/stublibs/*.so*
%doc LICENSE*
@if:pck_devel
%files devel
%defattr(-,root,root)
%{_libdir}/ocaml/%{ocamlpck}/*.a
%{_libdir}/ocaml/%{ocamlpck}/*.cmx
%{_libdir}/ocaml/%{ocamlpck}/*.cmxa
%{_libdir}/ocaml/%{ocamlpck}/*.mli
#%doc CHANGES* README.md
@fi:pck_devel
%changelog
* @spec_changelog_date@ @packager_fullname@ <@packager_email@> @pck_version@-@spec_first_release@@DISTRO_rpm@
- @spec_changelog_comment@

View File

@ -8,15 +8,13 @@ Group: System/Libraries/Perl
Vendor: @VENDOR@
Distribution: @DISTRO@
Packager: @packager_fullname@ <@packager_email@>
URL: http://www.cpan.org
Source: http://www.cpan.org/modules/by-module/...
URL: https://www.cpan.org
Source: https://www.cpan.org/modules/by-module/...
License: GPL, Artistic
## AUTOBUILDREQ-BEGIN
## note: run 'autospec -u -a6 @pck_name@' to get the list of build requirements.
## AUTOBUILDREQ-END
BuildRequires: perl-devel
Requires: perl >= %perl_major_ver
BuildRoot: @rpm_default_buildroot@
%description
...
@ -44,14 +42,14 @@ for dir in `find %{buildroot} -type d | grep $strid`; do
\ echo "%dir ${dir#%buildroot}" >> .packlist
done
#find %{buildroot} -name *.so -exec chmod u+w {} \\;
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%files -f .packlist
%defattr(-,root,root)
@standard_docs@
## note: eventually add the remaining documents (if any)
# @standard_docs_devel@
%changelog
* @spec_changelog_date@ @packager_fullname@ <@packager_email@> @pck_version@-@spec_first_release@@DISTRO_rpm@

55
templates/perl-build Normal file
View File

@ -0,0 +1,55 @@
%define perl_major_ver %(eval `perl -V:version`; echo ${version%*.[0-9]*}.0)
Name: @pck_name@
Version: @pck_version@
Release: @spec_first_release@@DISTRO_rpm@
Summary: ... - ...
Group: System/Libraries/Perl
Vendor: @VENDOR@
Distribution: @DISTRO@
Packager: @packager_fullname@ <@packager_email@>
URL: https://www.cpan.org
Source: https://www.cpan.org/modules/by-module/...
License: GPL, Artistic
## AUTOBUILDREQ-BEGIN
## note: run 'autospec -u -a6 @pck_name@' to get the list of build requirements.
## AUTOBUILDREQ-END
Requires: perl >= %perl_major_ver
%description
...
%prep
%setup -q
%build
%{__perl} Build.PL installdirs=vendor
./Build
./Build test
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
./Build install --destdir=%{buildroot}
packlist=`find %{buildroot} -name .packlist`
[ -z "$packlist" ] && exit 1 || cat $packlist | \\
\ sed "s,%{buildroot},,g;s,.*/man/.*,&.gz,g" | \\
\ sort -u > .packlist && rm -f $packlist
strid=`echo $packlist | sed 's,.*auto\\(.*\\)/.packlist,\\1,'`
for dir in `find %{buildroot} -type d | grep $strid`; do
\ echo "%dir ${dir#%buildroot}" >> .packlist
done
#find %{buildroot} -name *.so -exec chmod u+w {} \\;
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%files -f .packlist
%defattr(-,root,root)
@standard_docs@
%changelog
* @spec_changelog_date@ @packager_fullname@ <@packager_email@> @pck_version@-@spec_first_release@@DISTRO_rpm@
- @spec_changelog_comment@

View File

@ -1,3 +1,4 @@
%define pkgname %(echo %name | cut -d- -f2- | tr - _)
Name: @pck_name@
Version: @pck_version@
Release: @spec_first_release@@DISTRO_rpm@
@ -12,39 +13,38 @@ License: ...
## AUTOBUILDREQ-BEGIN
## note: run 'autospec -u -a6 @pck_name@' to get the list of build requirements.
## AUTOBUILDREQ-END
BuildRequires: libpython-devel
Requires: python >= %python_version
BuildRoot: @rpm_default_buildroot@
%description
%{summary}.
%if 0%{?with_pyver}
%pyver_package
%endif
%prep
%setup -q
%build
CFLAGS="%{optflags}" %{__python} setup.py build
CFLAGS="%{optflags}" %{__python} -m build --no-isolation --wheel
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%{__python} setup.py install \\
\ -O1 --skip-build \\
\ --root="%{buildroot}" \\
\ --install-headers=%{_includedir}/python \\
\ --install-lib=%{python_sitearch} \\
\ --single-version-externally-managed \\
\ --record=%{name}.filelist
%{__python} -m installer --destdir=%{buildroot} dist/*.whl
sed -i "\\,\\.egg-info/,d;s,.*/man/.*,&.gz," %{name}.filelist
#%if "%{?with_pyver}" != "3"
## Rename any conflicting file outside of python site packages tree
#for f in %{_bindir}/pdm; do
# mv %{buildroot}${f}{,-%{?pyappend}}
#done
#%endif
%files -f %{name}.filelist
%files %{?pyappend}
%defattr(-,root,root)
## note: this list is just an example; modify as required
# %{python_sitearch}/%{name}.py*
# %{python_sitearch}/%{name}.so
%dir %{python_sitelib}/%{pkgname}-%{version}.dist-info
%{python_sitelib}/%{pkgname}-%{version}.dist-info/*
%dir %{python_sitelib}/%{pkgname}
%{python_sitelib}/%{pkgname}/*
@standard_docs@
## note: eventually add the remaining documents (if any)
# @standard_docs_devel@
%changelog
* @spec_changelog_date@ @packager_fullname@ <@packager_email@> @pck_version@-@spec_first_release@@DISTRO_rpm@

View File

@ -0,0 +1,49 @@
%define pkgname %(echo %name | cut -d- -f2- | tr - _)
Name: @pck_name@
Version: @pck_version@
Release: @spec_first_release@@DISTRO_rpm@
Summary: ...
Group: System/Libraries
Vendor: @VENDOR@
Distribution: @DISTRO@
Packager: @packager_fullname@ <@packager_email@>
URL: ...
Source: ...
License: ...
## AUTOBUILDREQ-BEGIN
## note: run 'autospec -u -a6 @pck_name@' to get the list of build requirements.
## AUTOBUILDREQ-END
%description
%{summary}.
%if 0%{?with_pyver}
%pyver_package
%endif
%prep
%setup -q
%build
CFLAGS="%{optflags}" %{__python} setup.py build
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%{__python} setup.py install \\
\ -O1 --skip-build \\
\ --root="%{buildroot}" \\
\ --install-headers=%{python_inc} \\
\ --install-lib=%{python_sitearch} \\
\ --record=%{name}.filelist
sed -i "\\,\\.egg-info/,d;s,.*/man/.*,&.gz," %{name}.filelist
%files %{?pyappend} -f %{name}.filelist
%defattr(-,root,root)
%dir %{python_sitearch}/%{pkgname}-%{version}-py*.egg-info
%{python_sitearch}/%{pkgname}-%{version}-py*.egg-info/*
@standard_docs@
%changelog
* @spec_changelog_date@ @packager_fullname@ <@packager_email@> @pck_version@-@spec_first_release@@DISTRO_rpm@
- @spec_changelog_comment@

View File

@ -19,7 +19,6 @@ BuildRequires: @build_tool@
Requires(post): %{__install_info}
Requires(preun): %{__install_info}
@fi:infopages
BuildRoot: @rpm_default_buildroot@
%description
...
@ -46,10 +45,6 @@ Requires: gtk-doc
This package includes the %{name} API documentation.
@fi:pck_apidocs
@if:debug_package
%debug_package
@fi:debug_package
%prep
%setup -q

View File

@ -19,7 +19,6 @@ BuildRequires: @build_tool@
Requires(post): %{__install_info}
Requires(preun): %{__install_info}
@fi:infopages
BuildRoot: @rpm_default_buildroot@
%description
...

108
templates/web Normal file
View File

@ -0,0 +1,108 @@
%define serverdir %(apxs -q htdocsdir 2>/dev/null)
# To create a customized installation:
# autospec -u @pck_name@ -a5 \\
# -d "installdir=%serverdir/../www.example.com, \\
# sitename=example, \\
# adminmail=webmaster@example.com"
%if "%{?installdir}" == ""
%define installdir %{serverdir}/@pck_name@
%endif
%if "%{?sitename}" != ""
%if "%{?servername}" == ""
%define servername %(basename %installdir 2>/dev/null)
%endif
%define serverlogdir %(apxs -q logfiledir 2>/dev/null)
%else
%if "%{?aliasdir}" == ""
%define aliasdir /@pck_name@
%endif
%endif
Name: %{?sitename:%sitename-website-}@pck_name@
Version: @pck_version@
Release: @spec_first_release@@DISTRO_rpm@
Summary: ...
Group: Applications/Web
Vendor: @VENDOR@
Distribution: @DISTRO@
Packager: @packager_fullname@ <@packager_email@>
URL: ...
Source: ...
License: ...
## AUTOBUILDREQ-BEGIN
## AUTOBUILDREQ-END
%description
...
%prep
%setup -q
%build
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
install -d %{buildroot}%{installdir}
cp -a * %{buildroot}%{installdir}
cp .htaccess %{buildroot}%{installdir}
install -d %{buildroot}%{_sysconfdir}/httpd/httpd.d
%if "%{?sitename}" != ""
cat > %{buildroot}%{_sysconfdir}/httpd/httpd.d/%{servername}.conf << EOF
%else
cat > %{buildroot}%{_sysconfdir}/httpd/httpd.d/%{name}.conf << EOF
%endif
%if "%{?sitename}" == ""
%if "%(dirname %installdir)" != "%{serverdir}"
Alias %{aliasdir} %{installdir}
%endif
%endif
<Directory %{installdir}>
AllowOverride All
RewriteEngine On
Order allow,deny
Allow from All
</Directory>
%if "%{?sitename}" != ""
%if "%(dirname %installdir)" != "%{serverdir}"
<VirtualHost *:80>
%{?adminmail:ServerAdmin %adminmail}
DocumentRoot %{installdir}
ServerName %{servername}
ErrorLog %{serverlogdir}/%{servername}-error_log
CustomLog %{serverlogdir}/%{servername}-access_log common
</VirtualHost>
%endif
%endif
EOF
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%post
if [ $1 -ge 1 ]; then
[ -e %{_localstatedir}/lock/subsys/httpd ] && service httpd reload || :
fi
:
%files
%defattr(-,root,root)
%if "%{?sitename}" != ""
%config(noreplace) %{_sysconfdir}/httpd/httpd.d/%{servername}.conf
%else
%config(noreplace) %{_sysconfdir}/httpd/httpd.d/%{name}.conf
%endif
%dir %{installdir}
%{installdir}/.htaccess
%{installdir}/*
@standard_docs@
## note: eventually add the remaining documents (if any)
# @standard_docs_devel@
%changelog
* @spec_changelog_date@ @packager_fullname@ <@packager_email@> @pck_version@-@spec_first_release@@DISTRO_rpm@
- @spec_changelog_comment@

View File

@ -30,6 +30,14 @@ check: $(pck_tests)
&& echo "[PASSED]" || { echo "[FAILED]"; exit 1; };\
done
pot-files: $(pck_tests)
@for f in $(pck_tests); do\
echo -n "Generating po template '$$f.pot'...";\
/bin/bash --dump-po-strings $$f \
> $(srcdir)/po/$$f.pot \
&& echo "[DONE]" || { echo "[ERROR]"; exit 1; };\
done
install: $(pck_tests)
@$(INSTALL_DIR) $(DESTDIR)$(testdir)
for f in $(pck_tests); do\
@ -43,3 +51,6 @@ uninstall:
clean:
rm -f $(patsubst %.in,%,$(pck_tests_infiles))
@for f in $(pck_tests); do\
rm -f $(srcdir)/po/$$f.pot;\
done

View File

@ -1,21 +1,24 @@
#!/bin/bash
# test00_specsyntax -- @package@ test (syntax checks of a specfile)
# Copyright (C) 2012 Davide Madrisan <davide.madrisan@gmail.com>
# Copyright (C) 2012-2013 Davide Madrisan <davide.madrisan@gmail.com>
[ -z "$BASH" ] || [ ${BASH_VERSION:0:1} -lt 2 ] &&
echo $"this script requires bash version 2 or better" >&2 && exit 1
me=("test00_specsyntax" "@version@" "@date@")
[ -r @libdir@/libmsgmng.lib ] ||
{ echo "$me: "$"library not found"": @libdir@/libmsgmng.lib" 1>&2
exit 1; }
. @libdir@/libmsgmng.lib
if [[ -z "$LANG" && -r /etc/sysconfig/i18n ]]; then
. /etc/sysconfig/i18n
[ "$LANG" ] && export LANG
fi
TEXTDOMAIN="test00_specsyntax"; export TEXTDOMAIN
[ -r @libdir@/libtranslate.lib ] ||
{ echo "$me: "$"library not found"": @libdir@/libtranslate.lib" 1>&2
exit 1; }
. @libdir@/libtranslate.lib
notify.debug $"loading"": \`test00_specsyntax'..."
# check if all the needed tools are available
for tool in cat file getopt grep sed; do
@ -38,6 +41,35 @@ function specfile.checksyntax() {
notify.note " * $specfile"
local total_issues=0
local user_agent="Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/132.0"
# 0. checking if 'Source[0]' is a valid internet address
# (skip this test if no '%setup' section has been found)
test.skip $test_number || {
notify.note "$(test.num2str). ${NOTE}"\
"url""${NORM}..."
if [[ "$SPEC_URL" ]]; then
{ notify.debug "\
\`url': "$"checking Source URL with: ""\`curl -s -o /dev/null -w \"%{http_code}\" -A \"${user_agent}\" $SPEC_URL'"
}
http_code=`curl -s -o /dev/null -w "%{http_code}" -A "${user_agent}" $SPEC_URL`
if [ "$http_code" != "200" ]; then
if [ "${http_code:0:2}" == "30" ]; then
http_effective_url=`curl -w "%{url_effective}" -I -L -s -o /dev/null -A "${user_agent}" -S $SPEC_URL`
{ notify.warning "\
\`url': "$"redirect detected: replacing from \`$SPEC_URL' to \`${http_effective_url}'"
let "total_issues += 1";
}
sed -i "s|^\(URL:[[:space:]]*\)$SPEC_URL.*|\1${http_effective_url}|" $specfile
else
{ notify.error "\
\`url': "$"invalid return code for \`$SPEC_URL': $http_code"
let "total_issues += 1"; }
fi
fi
fi; }
test_number=$(($test_number + 1))
# 1. checking if 'Source[0]' is a valid internet address
# (skip this test if no '%setup' section has been found)
@ -81,7 +113,7 @@ not a standard structure (see config file)";
# 3. check if `%setup' have `-D' and/or `-T' options
test.skip $test_number || {
notify.note "$(test.num2str). ${NOTE}"\
$"%setup""${NORM}..."
"%setup""${NORM}..."
[[ "$(cat $specfile | \
sed -n "/%setup/{/-D /p;/-T /p;/-D$/p;/-T$/p}")" ]] &&
@ -95,7 +127,7 @@ found \`-D' and/or \`-T' option(s) in the \`%setup' directive"
# note: skip commented out blocks
test.skip $test_number || {
notify.note "$(test.num2str). ${NOTE}"\
$"%defattr""${NORM}..."
"%defattr""${NORM}..."
[[ "$(sed -e '
# print paragraph if it contains "%files" and "%defattr"
/./{H;$!d;}' -e 'x;/%files/!d;/%defattr/!d' $specfile | \
@ -111,7 +143,7 @@ missing at least one \`%defattr' directive"
# - look in the block : `%build' to `%install'
test.skip $test_number || {
notify.note "$(test.num2str). ${NOTE}"\
$"%build, %install""${NORM}..."
"%build, %install""${NORM}..."
local token tokens
sed -n '/%build/,/%install/p' $specfile | \
@ -160,8 +192,7 @@ $([[ "$rpm_macro_makeinstall" ]] &&
# 6. check if '%find_lang' is used when localization files are detected
test.skip $test_number || {
notify.note "$(test.num2str). ${NOTE}"\
$"%find_lang""${NORM}..."
notify.note "$(test.num2str). ${NOTE}%find_lang${NORM}..."
# FIXME : the test should perhaps be improved...
grep -q "^[ ]*[^# ]*/share/locale/" $specfile &&
@ -180,62 +211,7 @@ ${NOTE}"$"Hint"":${NORM}
}
test_number=$(($test_number + 1))
# 7. check if the install/uninstall code is present
test.skip $test_number || {
notify.note "$(test.num2str). ${NOTE}"\
$"info pages""${NORM}..."
local infopages errors
# FIXME: non LSB compliant systems are unsupported
infopages="$(\
grep "/share/info/\|^[ ]*%_infodir\|^[ ]*%{_infodir}" $specfile | \
grep -v "^[ ]*#\|^[a-zA-Z]")"
if [[ "$infopages" ]]; then
let "errors = 0"
if [ "$rpm_macro_installinfo" ]; then
grep -q "$rpm_macro_installinfo" $specfile ||
{ let "errors += 1"
notify.debug "rpm_macro_installinfo check failed"; }
fi
if [ "$rpm_macro_uninstallinfo" ]; then
grep -q "$rpm_macro_uninstallinfoo" $specfile ||
{ let "errors += 1"
notify.debug "rpm_macro_uninstallinfo check failed"; }
fi
if [ "$rpm_macro_installinfo_binary" ]; then
grep -q "\
Requires(post)[ \t]*:[ \t]*${rpm_macro_installinfo_binary}" $specfile ||
{ let "errors += 1"
notify.debug "rpm_macro_installinfo_binary check failed"; }
fi
[ "$errors" = "0" ] ||
{ notify.error "\
"$"info pages are not installed/uninstalled in the correct way""${NORM}
---------------------------------------
${NOTE}"$"Hint"":${NORM}
$([[ "$rpm_macro_installinfo_binary" ]] &&
echo "Requires(post): $rpm_macro_installinfo_binary" ||
echo "Requires(post): ${path_installinfo:-/sbin/install-info}")
%post [<subpackage>]
$([[ "$rpm_macro_installinfo" ]] &&
echo "$rpm_macro_installinfo %{name}.info" ||
echo "${path_installinfo:-/sbin/install-info} %{name}.info")
%preun [<subpackage>]
$([[ "$rpm_macro_uninstallinfo" ]] &&
echo "$rpm_macro_uninstallinfo %{name}.info" ||
echo "${path_installinfo:-/sbin/install-info} --delete %{name}.info")
exit 0
---------------------------------------
"
let "total_issues += $errors"; }
fi; }
test_number=$(($test_number + 1))
# 8. check for illegal 'Group's (see configuration file)
# 7. check for illegal 'Group's (see configuration file)
test.skip $test_number || {
if [ "${#rpm_allowed_groups[*]}" = 0 ]; then
# 'rpm_allowed_groups' unset in the configuration files
@ -272,7 +248,7 @@ ${NOTE}@package@ --eval=rpm_allowed_groups${NORM}
fi; }
test_number=$(($test_number + 1))
# 9. check for no approved 'License's (see configuration file)
# 8. check for no approved 'License's (see configuration file)
test.skip $test_number || {
if [ "${#rpm_approved_licenses[*]}" = 0 ]; then
# 'rpm_approved_licenses' unset in the configuration files

View File

@ -1,24 +1,27 @@
#!/bin/bash
# test01_pkgquality -- @package@ test (rpm quality checks)
# Copyright (C) 2008,2012 Davide Madrisan <davide.madrisan@gmail.com>
# Copyright (C) 2008,2012-2014 Davide Madrisan <davide.madrisan@gmail.com>
[ -z "$BASH" ] || [ ${BASH_VERSION:0:1} -lt 2 ] &&
echo $"this script requires bash version 2 or better" >&2 && exit 1
me=("test01_pkgquality" "@version@" "@date@")
[ -r @libdir@/libmsgmng.lib ] ||
{ echo "$me: "$"library not found"": @libdir@/libmsgmng.lib" 1>&2
exit 1; }
. @libdir@/libmsgmng.lib
if [[ -z "$LANG" && -r /etc/sysconfig/i18n ]]; then
. /etc/sysconfig/i18n
[ "$LANG" ] && export LANG
fi
TEXTDOMAIN="test01_pkgquality"; export TEXTDOMAIN
[ -r @libdir@/libtranslate.lib ] ||
{ echo "$me: "$"library not found"": @libdir@/libtranslate.lib" 1>&2
exit 1; }
. @libdir@/libtranslate.lib
notify.debug $"loading"": \`test01_pkgquality'..."
# check if all the needed tools are available
for tool in file find getopt grep ls ldd; do
for tool in file find getopt grep ls ldd wc; do
[ "$(type -p $tool)" ] ||
notify.error $"utility not found"": \`$tool'"
done
@ -215,8 +218,9 @@ $"checking for wrong file attributes in bin and lib directories""${NORM}..."
for pck in ${rpmpkg_name[@]}; do
pushd $tmpextractdir/$i >/dev/null
for f in $( find . -type f \( \
\( -name '*.so.*' -not -perm 755 \) -or \
\( -name '*.so' -not -perm 755 \) -or \
\( -name '*.so.*' -and -not -name '*.so.owner' \
-and -not -perm 755 \) -or \
\( -name '*.so' -and -not -perm 755 \) -or \
\( \( -path './bin/*' -or \
-path './sbin/*' -or \
-path './usr/bin/*' -or \
@ -284,7 +288,7 @@ $"checking for binary files installed in /etc (see FHS)""${NORM}..."
let "i = 0"
for pck in ${rpmpkg_name[@]}; do
pushd $tmpextractdir/$i >/dev/null
for f in $( find ./etc -type f -perm +111 2>/dev/null ); do
for f in $( find ./etc -type f -perm /111 2>/dev/null ); do
case $f in
./etc/rc.d/init.d/*) ;;
*) let "warning = 1" &&
@ -323,26 +327,36 @@ $"checking if the info catalog is updated when necessary""${NORM}..."
{ let "i += 1"; continue; } # no info pages found
#notify.debug "$FUNCNAME: info page(s) found"
[[ "$(rpm -p -q --scripts $pck | sed -n '
/postinstall /,${/\/sbin\/install-info \/.*/p}')" ]] || let "error+=1"
[[ "$(rpm -p -q --requires $pck 2>/dev/null | sed -n '
/^[ \t]*\/sbin\/install-info/p')" ]] || let "error+=1"
[[ "$(rpm -p -q --scripts $pck | sed -n '
/preuninstall /,${/\/sbin\/install-info.*--[delete\|remove].*/p}')" ]] || \
let "error+=1"
# note: we just check for at list two occurences of the command
# '/sbin/install-info' in the package scriptlets
[[ "$(rpm -p -q --scripts $pck 2>/dev/null | sed -n '
/^[ \t]*\/sbin\/install-info/p' | wc -l)" -ge 2 ]] || let "error+=1"
[ "$error" = "0" ] ||
{ notify.warning "${NOTE}${pck##*/}${NORM}"
notify.note $"info pages should be installed/uninstalled""${NORM}
---------------------------------------
${NOTE}"$"Hint"":${NORM}
$([[ "$rpm_macro_installinfo_binary" ]] &&
echo "Requires(post):$rpm_macro_installinfo_binary" ||
echo "Requires(post):${path_installinfo:-/sbin/install-info}")
%package [<subpackage>]
...
$(if [[ "$rpm_macro_installinfo_binary" ]]; then
echo "\
Requires(post):$rpm_macro_installinfo_binary
Requires(preun):$rpm_macro_installinfo_binary"
else
echo "\
Requires(post):${path_installinfo:-/sbin/install-info}
Requires(preun):${path_installinfo:-/sbin/install-info}"
fi)
%post [<subpackage>]
$([[ "$rpm_macro_installinfo" ]] &&
echo "$rpm_macro_installinfo %{name}.info" ||
echo "${path_installinfo:-/sbin/install-info} %{name}.info")
exit 0
%preun [<subpackage>]
$([[ "$rpm_macro_uninstallinfo" ]] &&
@ -420,9 +434,11 @@ $"checking for packages with bad BuildArch tag""${NORM}..."
let "i = 0"
for pck in ${rpmpkg_name[@]}; do
pushd $tmpextractdir/$i >/dev/null
for f in $(find -mindepth 2 -perm +111 -type f \
-exec file {} \; | grep -E "( ELF | library )"); do
notify.debug "found a ELF file: \`${NOTE}${f/./}${NORM}'"
for f in $(LC_ALL=C find -mindepth 2 -type f \
-exec file {} \; 2>/dev/null | grep -E "(\
ELF | OCaml library | ar archive |\
dynamically linked | statically linked )"); do
notify.debug "found binary or library file: \`${NOTE}${f/./}${NORM}'"
let "warning = 1"
break
done

View File

@ -1,21 +1,24 @@
#!/bin/bash
# test02_pkgsecurity -- @package@ test (rpm security checks)
# Copyright (C) 2008,2012 Davide Madrisan <davide.madrisan@gmail.com>
# Copyright (C) 2008,2012,2014 Davide Madrisan <davide.madrisan@gmail.com>
[ -z "$BASH" ] || [ ${BASH_VERSION:0:1} -lt 2 ] &&
echo $"this script requires bash version 2 or better" >&2 && exit 1
me=("test02_pkgsecurity" "@version@" "@date@")
[ -r @libdir@/libmsgmng.lib ] ||
{ echo "$me: "$"library not found"": @libdir@/libmsgmng.lib" 1>&2
exit 1; }
. @libdir@/libmsgmng.lib
if [[ -z "$LANG" && -r /etc/sysconfig/i18n ]]; then
. /etc/sysconfig/i18n
[ "$LANG" ] && export LANG
fi
TEXTDOMAIN="test02_pkgsecurity"; export TEXTDOMAIN
[ -r @libdir@/libtranslate.lib ] ||
{ echo "$me: "$"library not found"": @libdir@/libtranslate.lib" 1>&2
exit 1; }
. @libdir@/libtranslate.lib
notify.debug $"loading"": \`test02_pkgsecurity'..."
# check if all the needed tools are available
for tool in file find getopt grep objdump sed; do
@ -86,7 +89,7 @@ $"checking for RPATH vulnerabilities""${NORM}..."
# find ELF binaries (ELF 32-bit LSB executable)
# and libs (ELF 32-bit LSB shared object)
for f in $(find -mindepth 2 -perm +111 -type f); do
for f in $(find -mindepth 2 -perm /111 -type f); do
if [[ "$(file $f | grep " ELF ")" ]]; then
rpath="$(security.filecheckrpath $f)"
if [ "$rpath" ]; then
@ -108,7 +111,7 @@ $"checking for setuid binaries""${NORM}..."
let "i = 0"
for pck in ${rpmpkg_name[@]}; do
pushd $tmpextractdir/$i >/dev/null
for f in $(find -mindepth 2 -perm +111 -type f 2>/dev/null); do
for f in $(find -mindepth 2 -perm /111 -type f 2>/dev/null); do
if [[ "$(LC_ALL=C file $f | grep " setuid ")" ]]; then
notify.warning "${NORM}${pck##*/} --> ${f/./}"
let "total_issues += 1"
@ -144,7 +147,7 @@ $"checking for unsecure use of \`\$\$' in shell and perl scripts""${NORM}..."
let "i = 0"
for pck in ${rpmpkg_name[@]}; do
pushd $tmpextractdir/$i >/dev/null
for f in $(find -mindepth 1 -perm +111 -type f); do
for f in $(find -mindepth 1 -perm /111 -type f); do
# we are interesting only in shell scripts
[[ "$(file $f | grep "shell script\|perl script")" ]] ||
continue

View File

@ -37,7 +37,7 @@ eval $(autospec -q --eval=logging_dir)
[ "$logging_dir" ] || logging_dir="${tmppath_dir:-/var/tmp}/@package@"
# FIXME : get the list of perl modules from the repository
# ftp://ftp.qilinux.it:21/pub/QiLinux/devel/SPECS
# ftp://ftp.openmamba.org:21/pub/openmamba/devel/SPECS
# WARNING : this variable used for test only
mperl_lst="perl-Archive-Tar.spec"

View File

@ -860,7 +860,7 @@ This package contains static libraries and header files need for development."
local pck_configure=`(\
cd $tmpdir/$pck_rootdir &&
{ [[ -x ./configure ]] && echo -n "./configure"
LANG=C find . -mindepth 2 -type f -perm +111 \
LANG=C find . -mindepth 2 -type f -perm /111 \
-name configure -printf "%p "; } )`
notify.debug "pck_configure = \"$pck_configure\""