Compare commits

...

403 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
Davide Madrisan
fb05bf3201 Release 1.14.3
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-11-18 20:18:37 +01:00
Davide Madrisan
f2dc888706 libcfg.lib: fix translation string (misplaced ':' character)
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-11-18 20:16:52 +01:00
Davide Madrisan
c84fa05747 libcfg.lib: exit if the given configuration files do not exist
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-11-18 20:09:15 +01:00
Davide Madrisan
d659a5d779 update documentation and specfile
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-11-18 19:30:24 +01:00
Davide Madrisan
f81b2365f6 ChangeLog: standardize the format of the last entries
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-11-18 16:02:13 +01:00
c5d5093431 libapse.lib: fix some version comparison errors by specifying numbers base
How to reproduce: /usr/bin/autospec -u ocre -a1,2

Errors fixed:
/usr/share/autospec/lib/libapse.lib: line 159: 019: value too great for base (error token is "019")
/usr/share/autospec/lib/libapse.lib: line 162: 019: value too great for base (error token is "019")
2012-11-16 18:40:20 +01:00
Davide Madrisan
5008e884d4 libcfg.lib, config-getvar: option '-C|--config': accept a list of configuration files containing wilcards
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-11-15 22:55:31 +01:00
Davide Madrisan
343e644abe pck-update: fix a string translation by adding the missing '$' prefix
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-11-15 19:31:03 +01:00
Davide Madrisan
bbc877d5ed ChangeLog: fix paragraph indentation
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-11-14 22:48:46 +01:00
Davide Madrisan
15f3575b2e autospec, plugins: add the option '-C|--config' for selecting a different user configuration file or list of user configuration files
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-11-14 22:42:08 +01:00
Davide Madrisan
8eee8ae037 autospec: fix for the options requiring an argument
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-11-13 23:33:02 +01:00
Davide Madrisan
093aa4676c autospec: add some update debug messages
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-11-13 22:07:36 +01:00
Davide Madrisan
badca703f0 autospec: fix parsing of multi-string arguments
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-11-13 21:59:40 +01:00
Davide Madrisan
97552d02b8 Release 1.14.2
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-11-12 21:40:06 +01:00
Davide Madrisan
705396eab1 tests: fix the color tags used in the final messages
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-11-11 23:41:11 +01:00
Davide Madrisan
cf3bcb0edb manpage: update italian manpage and document new extensions
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-11-11 22:48:30 +01:00
Davide Madrisan
c19391e1be conf/Makefile: simplify the makefile by removing the static list of files
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-11-11 19:35:04 +01:00
Davide Madrisan
c8faaf8a70 libmsgmng.lib: allow users to write and select customized color schemes (~/.autospec.d/color-theme.<color_scheme>)
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-11-11 19:33:38 +01:00
Davide Madrisan
a2056ba9d5 autospec, autospec.conf, plugins: replace the option '--colorize' by '--colors <color-theme>'
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-11-11 18:56:52 +01:00
Davide Madrisan
ac3e9bc14b conf/Makefile: enable 'color-theme.none'
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-11-11 00:19:53 +01:00
Davide Madrisan
61c739e733 config: add color themes
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-11-11 00:06:33 +01:00
Davide Madrisan
98fe5c6a6f autospec: deprecate the option '--colorize'
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-11-11 00:00:54 +01:00
Davide Madrisan
54b8190ba1 revert commit a03a529513ba45552d7dc359baf464a85a25b1fb: this creates some issues in the translations
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-11-10 23:05:06 +01:00
Davide Madrisan
0f301dc9fa all plugins: the option '--colorize-theme' must set colorize to '1'
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-11-10 22:55:40 +01:00
Davide Madrisan
4edf024f5f libcfg.lib: do not check for configuration files groups and permissions
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-11-10 21:42:10 +01:00
Davide Madrisan
ffe2b496d1 autospec.spec: remove the variable 'rpmbuild_group': it's no more needed. Personal data is located in the files ~/.autospec and ~/.autospec.d/*.conf
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-11-10 21:18:33 +01:00
Davide Madrisan
e8b9a33167 lib/libmsgmng.lib, conf/Makefile: move theme settings to configuration files (color-theme.*)
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-11-10 21:01:37 +01:00
Davide Madrisan
cd7d6b663d autospec,plugins,libraries: a color scheme can be selected now by using the new command-line option '--colorize-theme'
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-11-10 15:47:12 +01:00
Davide Madrisan
990661c11e autospec: send the debug message showing autospec version as soon as possible
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-11-10 12:21:10 +01:00
Davide Madrisan
a03a529513 all plugins: do not load a library already loaded by another autospec module
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-11-10 11:52:20 +01:00
Davide Madrisan
b5a1a17876 plugins/*: Execute 'notify.disable_colors()' when 'colorize' is set to '0' (disabled) to ignore color redefinitions made by user
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-11-09 22:57:36 +01:00
Davide Madrisan
5e90d9edb5 Release 1.14.1
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-11-08 23:33:10 +01:00
Davide Madrisan
acf87e5628 lib/libcfg.lib, lib/libmsgmng.lib: update copyleft
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-11-08 22:09:52 +01:00
Davide Madrisan
a483f12876 autospec.conf: better documentation for terminal (and web) color setup
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-11-08 21:20:49 +01:00
Davide Madrisan
924f2b2cab libmsgmng.lib: allow users to modify ESC, CRIT, NOTE, WARN, EXIT, and NORM color codes
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-11-08 21:07:55 +01:00
Davide Madrisan
8b6e2b2c50 config-getvar: update copyleft
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-11-08 20:33:11 +01:00
Davide Madrisan
bcfa07d7dc autospec: postpone the load of libcfg.lib
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-11-07 23:25:32 +01:00
Davide Madrisan
218df59a47 templates/standard: add a devel subpackage
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-11-07 23:17:32 +01:00
Davide Madrisan
45b6f0d61d pck-update: restore build requirement detection for *.so requirements
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-11-07 22:45:44 +01:00
Davide Madrisan
f929f20486 config-getvar: fix the help message (incorrect list of default files)
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-11-07 22:24:08 +01:00
Davide Madrisan
15825d0a4b spec-create: new option '--changelog'
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-11-07 21:26:51 +01:00
Davide Madrisan
9421ad3760 Release 1.14.0
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-11-01 23:47:28 +01:00
Davide Madrisan
941504de3c pck-update: add a warning message when a requirement is ignored
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-11-01 23:11:39 +01:00
Davide Madrisan
3716f5e0c2 pck-update: try to avoid reporting package requirements set with 'Requires:' as build requirements. Unless not better identified requirements are in 'a(b)' form don't report them as build requirements to avoid breaking stage1 builds and causing unneeded circular dependencies
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-11-01 22:27:12 +01:00
Davide Madrisan
4623dd6866 libnetwork.lib: fix warning message in 'git.create_tarball()'
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-10-31 22:11:49 +01:00
Davide Madrisan
3425fbf7ee libnetwork.lib: git.create_tarball(): add a warning message when the version passed to the function is not the expected one (that is a string made by the current date in the format YYYYMMDD followed by 'git')
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-10-31 22:01:49 +01:00
Davide Madrisan
f107a20bf8 libnetwork.lib; pck-update (action 3,5): improve the functions 'git.download()' and 'git.create_tarball()' by adding the option '--pck-version' and use it when calling 'git.download' in pck-update
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-10-30 23:17:59 +01:00
Davide Madrisan
80e22280fe pck-update (action 5): fix the package update from a git repository
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-10-30 19:52:19 +01:00
Davide Madrisan
7cc90d2efb pck-update (action 3,5): preliminary support for source files updates from a git repository
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-10-29 23:15:58 +01:00
Davide Madrisan
dfbd94458e libnetwork.lib: new helper function: 'git.download'
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-10-29 22:55:49 +01:00
Davide Madrisan
b8c8ce7fbe autospec.spec: update some requirements of the autospec subpackages in order to always use the real package names instead of their aliases ('Provides' tag)
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-10-20 17:23:36 +02:00
Davide Madrisan
770a201882 lib/libnetwork.lib: curl.download(): do use the curl options set by the function argument '--options' (or '-o') instead of the global variable ''
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-10-20 12:28:30 +02:00
Davide Madrisan
5d684cd01a pck-update: infofile.create(): quote all the elements of SPEC_SOURCE to avoid problems when the URL contains the letter '&'
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-10-16 21:44:17 +02:00
Davide Madrisan
58cae7acea Makefile: make 'make dist' a bit more verbose
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-10-14 22:19:58 +02:00
Davide Madrisan
4f472f6a27 po/it/spec-create.po: better translation
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-10-13 19:51:38 +02:00
Davide Madrisan
5be79dc09c po/it/spec-create.po: add missing translations
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-10-13 19:47:21 +02:00
Davide Madrisan
1448f6ab3d libnetwork: fix syntax error
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-10-13 19:43:58 +02:00
Davide Madrisan
b0555e95b7 libnetwork: print an informational message before creating the source compressed tarball. This may take a while
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-10-13 19:34:16 +02:00
Davide Madrisan
dde8cdd235 libnetwork: clone the entire git repository when the option '--preserve-dot-git' is selected by user
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-10-13 19:23:40 +02:00
Davide Madrisan
4c24d74501 test01_pkgquality: Do not use the operator '|&'. Use instead '2>&1 |' which is compatible at least with bash 3.2
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-10-11 21:20:34 +02:00
Davide Madrisan
ffc10a6e87 autospec.spec: add a missing build requirement: make
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-10-11 20:57:50 +02:00
Davide Madrisan
49655b2bf4 Makefile: modify the 'dist' directive to allow 'make dist', 'make dist-rpm', and 'make dist-rpm-install' with a cloned git archive
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-10-06 22:07:20 +02:00
Davide Madrisan
20748b3fe6 autospec.spec: make the specfile more distro-agnostic
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-10-06 18:46:50 +02:00
Davide Madrisan
4350f7d198 autospec.spec: update URL
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-10-06 18:22:48 +02:00
Davide Madrisan
29006f5ab4 Release 1.12.5
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-10-03 22:50:53 +02:00
Davide Madrisan
ebc1fd88ad spec-create: modify the 'Source' tag by including a parsable git url
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-10-03 22:21:20 +02:00
Davide Madrisan
6962a1ac16 libnetwork.lib: git.create_tarball(): add some debug messages
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-10-02 23:06:47 +02:00
Davide Madrisan
500d3b335e libnetwork.lib: git.create_tarball(): fix typo
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-10-02 21:14:04 +02:00
Davide Madrisan
5022004eac libnetwork.lib: git.create_tarball(): only clone the last commit
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-10-02 20:53:01 +02:00
Davide Madrisan
5cb16aebb6 autospec.spec: add a build requirement for gettext
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-09-29 21:31:12 +02:00
Davide Madrisan
f2b471f856 Release 1.12.4
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-09-22 08:32:00 +02:00
Davide Madrisan
ef06c3e486 libnetwork.lib: do not run the git command in quiet mode
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-09-22 08:19:29 +02:00
Davide Madrisan
0a648b670e spec-create, lib/libnetwork.lib: add aupport for git branches in spec-create by adding the new options --git-branch and --preserve-dot-git
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-09-19 19:27:50 +02:00
Davide Madrisan
165e54e8d2 spec-create: document the creation of a specfile starting from a git repository
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-09-09 20:11:13 +02:00
Davide Madrisan
775f2a7049 libnetwork.lib: remove the extra newline added to workaroung a bug in curl; it is fixed now
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-08-28 23:55:09 +02:00
Davide Madrisan
82b35315ec test01_pkgquality: when a file is detected as problematic do add its mime type
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-08-23 19:45:17 +02:00
Davide Madrisan
616d130d55 lib/libapsa.lib: coding style fixes
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-07-21 19:47:56 +02:00
Davide Madrisan
547b750aef Release 1.12.3
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-07-17 22:38:49 +02:00
Davide Madrisan
b89f644e9e 02-specfile-formatting-rules.conf: new default value for library_name_structure: "". The old value ("^lib") does no longer apply.
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-07-17 19:26:28 +02:00
Stefano Cotta Ramusino
d1b35c01fa conf/03-apse.conf: fix fsf and launchpad scraping values
Signed-off-by: Stefano Cotta Ramusino <stefano.cotta@openmamba.org>
2012-07-09 03:21:47 +02:00
Davide Madrisan
89d6517a79 libapse.lib: do not use "dirname" and "basename": bash provides primitives to do that
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-07-07 21:20:22 +02:00
Davide Madrisan
037669307b libapse.lib: style fixes
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-07-07 19:47:23 +02:00
Davide Madrisan
1504e58b3e libspec.lib: style fixes
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-07-07 17:17:11 +02:00
Stefano Cotta Ramusino
876146520e pck-update: action 3: generate right download URL after action 2
Signed-off-by: Stefano Cotta Ramusino <stefano.cotta@openmamba.org>
2012-07-04 03:44:14 +02:00
Stefano Cotta Ramusino
9db6a7c44d libspec.lib: expand compound rpm variables such as %{majorminor}
Signed-off-by: Stefano Cotta Ramusino <stefano.cotta@openmamba.org>
2012-07-04 03:37:20 +02:00
Stefano Cotta Ramusino
6f23a0da8e libapse.lib,conf/03-apse.conf: fix scraping values and add new sites
Signed-off-by: Stefano Cotta Ramusino <stefano.cotta@openmamba.org>
2012-07-04 03:28:22 +02:00
Davide Madrisan
b856cd2959 pck-update,libnetwork.lib: a package name can contain one or more undescores so add _ to the list of allowed characters
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-06-18 21:55:25 +02:00
Davide Madrisan
a14b989d3a pck-update (a4): allow a distribution-ID "upgrade" when updating the release number (example: 1mamba --> 2mamba2)
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-05-29 23:20:59 +02:00
Davide Madrisan
90968556d3 pck-update: fix syntax error in getopt --long argument
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-05-28 23:11:36 +02:00
Davide Madrisan
d8fb6bce76 Release 1.12.2
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-05-28 20:22:36 +02:00
Davide Madrisan
eb5fbded7d italian manpage: document --update-autobuildreq
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-05-28 20:20:36 +02:00
Davide Madrisan
11e2bc349c update documentation
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-05-28 20:18:57 +02:00
Davide Madrisan
c95afdf0c8 templates/kde4: remove wrong requirement
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-05-28 00:04:45 +02:00
Davide Madrisan
2acb605788 templates/kde4: add build requirement for automoc4
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-05-27 19:59:25 +02:00
Davide Madrisan
458987e4ba pck-update: new options --update-autobuildreq which replace a block AUTOBUILDREQ-BEGIN ... AUTOBUILDREQ-END by an updated one
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-05-27 19:55:01 +02:00
Davide Madrisan
036d9628f2 templates/kde4: add a requirement for kdelibs-devel in the -devel package preamble
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-05-27 15:30:53 +02:00
Davide Madrisan
a191a40d35 pck-update: do not check for missing build requirements and source files when pck-update is invoked with the option --list-check
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-05-26 21:42:29 +02:00
Davide Madrisan
75bf9e1ed6 italian manpage: add a few more examples and comments
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-05-25 23:22:39 +02:00
Davide Madrisan
9833128f5e Release 1.12.1
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-05-23 23:04:21 +02:00
Davide Madrisan
c6cd929d8b conf/06-security-system-library-paths.conf: allowed_libdirs: replace /opt/kde4/lib with /opt/kde/lib
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-05-21 22:08:58 +02:00
Davide Madrisan
5bbd6b6ee3 pck-update, test/*: update/add the code to check for the required external tools
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-05-20 22:30:07 +02:00
Davide Madrisan
c85911f95b conf/02-specfile-formatting-rules.conf: update source0_name_structure to allow *.tar.xz archives
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-05-20 20:55:31 +02:00
Davide Madrisan
4c72cde33e pck-update (a0): update message
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-05-20 20:24:45 +02:00
Davide Madrisan
eb43019406 test00_specsyntax: new module and translation files
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-05-20 17:10:03 +02:00
Davide Madrisan
1e41b58f45 Release 1.12.0
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-05-20 17:06:24 +02:00
Davide Madrisan
b26efe219f ChangeLog, NEWS: updated
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-05-20 17:04:38 +02:00
Davide Madrisan
f93b85c9f5 unify the output of all the modules test
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-05-20 16:42:59 +02:00
Davide Madrisan
7a68b819d4 pck-update, test00_specsyntax: move code from pck-update (action 4) to a new test file test00_specsyntax
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-05-19 23:10:12 +02:00
Davide Madrisan
8bb763e34b pck-update: provide the action number in the message asking for running tests
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-05-19 14:27:21 +02:00
Davide Madrisan
1dd0902efb BUGS: updated (the option --ignore-test works again)
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-05-19 14:20:11 +02:00
Davide Madrisan
a50a7d17d7 libtest.lib: new library for test framework
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-05-19 14:16:01 +02:00
Davide Madrisan
055aa310d9 pck-update: do not reinitialize the tests counter before executing a new test battery
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-05-19 10:58:33 +02:00
Davide Madrisan
476b8f1a62 autospec.spec: add a static requirement for bash
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-05-19 00:05:02 +02:00
Davide Madrisan
af1fa53444 pck-update, test01_*,: rework output of all tests
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-05-19 00:03:42 +02:00
Davide Madrisan
80d929a5b1 autospec.spec: add missing %defattr
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-05-18 22:11:29 +02:00
Davide Madrisan
2adf21cfd2 autospec.spec: update static requirements
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-05-18 20:07:33 +02:00
Davide Madrisan
5b6643f1fc documentation: update BUGS
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-05-18 16:20:11 +02:00
Davide Madrisan
f38c13e4f6 documentation: improve italian manpage
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-05-18 16:16:51 +02:00
Davide Madrisan
4c0d56f1a1 italian manpage: yet another update
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-05-15 23:42:21 +02:00
Davide Madrisan
b2e25bdff1 documentation: update italian man page
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-05-15 22:18:36 +02:00
Davide Madrisan
c439f88deb pck-update: update help message
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-05-15 22:10:50 +02:00
Davide Madrisan
2af2c5bdc7 remove italian howto
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-05-15 22:03:46 +02:00
Davide Madrisan
7b881f8e4f TODO: remove out-of-date stuff
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-05-10 22:18:00 +02:00
Davide Madrisan
6adc14a8a1 spec-create: Select makefile as build_techology when makefiles or GNUmalefiles are found, not only Makefiles
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-05-09 23:07:31 +02:00
Davide Madrisan
d7edada922 tests/test01_pkgquality: fix minor copy&paste error
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-05-08 23:52:00 +02:00
Davide Madrisan
1f2bd2cf03 tests/test01_pkgquality: check for libraries with undefined symbols after relocation
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-05-08 22:50:53 +02:00
Davide Madrisan
fc5e47711d templates/{library,standard,standard-daemon}: Missing requirement: "Requires(preun): %{__install_info}"
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-05-08 18:30:37 +02:00
Davide Madrisan
b0adf80f94 Makefile: update copyright
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-05-07 00:00:20 +02:00
Davide Madrisan
0df01f4999 pck-update.po: update italian translation
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-05-06 23:57:08 +02:00
Davide Madrisan
223e904242 pck-update: check specfiles for CR and CRLF line terminators; they can mislead the specfile parser
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-05-06 21:02:14 +02:00
Davide Madrisan
fac975675c autospec.spec: new subpackages
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-05-06 19:23:06 +02:00
Davide Madrisan
0484d69511 autospec.conf: rework configuration files
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-05-06 17:48:10 +02:00
Davide Madrisan
69f1cc0ef3 Makefile: fix uninstall tag
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-05-05 23:39:07 +02:00
Davide Madrisan
55bfa01730 Split autospec.conf into several configuration files
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-05-05 23:33:18 +02:00
Davide Madrisan
4f44b8b825 pck-update: package.update(): better notification message
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-05-04 23:30:40 +02:00
Davide Madrisan
ae734fb182 pck-update: action 0: better notification message
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-05-04 22:49:58 +02:00
Davide Madrisan
af8cfaceb0 autospec.conf: format_unpackaged_file_list: fix rpm variable expansion for /lib and /lib64
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-05-04 18:39:15 +02:00
Davide Madrisan
0c9278c7e8 pck-update: stop execution with an error code when specfile.newrelease() reports an error
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-05-01 23:18:39 +02:00
Davide Madrisan
876db3bedd Release 1.10.0
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-05-01 00:03:36 +02:00
Davide Madrisan
50b3fe9d32 libnetwork.lib: repository.get_srpm_pckname_from_site(): make the search case-insensitive
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-04-30 23:58:25 +02:00
Davide Madrisan
c77c428ff1 NEWS: update file
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-04-30 20:55:25 +02:00
Davide Madrisan
8f57ec4a1c libnetwork.lib: do not convert curl dumps to lowercase letters
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-04-29 00:10:30 +02:00
Davide Madrisan
d848b0a5b9 pck-update: do not ignore the release set by user
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-04-28 23:43:12 +02:00
Davide Madrisan
04a69669e4 libnetwork.lib: make repository.get_srpm_pckname_from_site() work again for curl dumps of ftp sites
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-04-25 23:07:55 +02:00
Davide Madrisan
0594180470 libnetwork.lib: move code from spec-create to the new function git.create_tarball()
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-04-24 22:39:23 +02:00
Davide Madrisan
59ef053eca ChangeLog: fix typo
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-04-24 21:27:33 +02:00
Davide Madrisan
56c06ecfdf autospec.spec: do not require /usr/bin/host in early stage platform development
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-04-24 21:23:37 +02:00
Davide Madrisan
f6f0d6445f libnetwork.lib,autospec.spec: do not require "host"
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-04-23 23:12:08 +02:00
Davide Madrisan
37b7784608 pck-update,lib/libnetwork.lib: "host" is not required by pck-update; move the requirement to libnetwork
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-04-23 21:21:10 +02:00
Davide Madrisan
a360868bda sped-create: exist with error when git is required but cannot be found
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-04-23 21:00:46 +02:00
Davide Madrisan
1ccfb7faff sped-create: also support git URL starting by http:// and https://
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-04-23 20:40:33 +02:00
Davide Madrisan
4ec7565752 spec-create: add a "## GITSOURCE" comment when git is used
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-04-23 00:18:04 +02:00
Davide Madrisan
36fcfd24d6 spec-create: allow specfile creation from a git repository
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-04-22 16:51:59 +02:00
Davide Madrisan
c3335e6113 Release 1.9.4
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-04-17 23:48:24 +02:00
Davide Madrisan
ed701d7161 Release 1.9.4
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-04-17 23:40:35 +02:00
Davide Madrisan
921c4b60f2 templates: remove Patch0 and %patch0
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-04-17 22:55:13 +02:00
Davide Madrisan
463df99f6c libnetwork.lib: simplify sed expression
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-04-14 23:16:20 +02:00
Davide Madrisan
2461f2ef9b libnetwork.lib: make search case insensitive
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-04-14 23:06:05 +02:00
Davide Madrisan
a01ecd4950 libnetwork.lib: revert 7d544e648181d2e617003e43258f2c923a1b859d
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-04-14 22:34:46 +02:00
Davide Madrisan
7d544e6481 pck-update (-a0): libnetwork.lib: remove trailing .src.rpm
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-04-14 22:12:51 +02:00
Davide Madrisan
882c043dc4 pck-update (-a0): fix for the case where regexpr is ".*"
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-04-14 22:08:51 +02:00
Davide Madrisan
2f6bd17716 pck-update (-a0): fully support generic regexpr
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-04-14 19:59:19 +02:00
Davide Madrisan
041719d96e pck-update (-a0): add support for regexpr
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-04-14 17:29:56 +02:00
Davide Madrisan
244e571a19 template kde4: remove Patch0 and %patch0
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-04-13 23:10:43 +02:00
Davide Madrisan
49ae2f41ac templates: Move %debug_package macro after all %description blocks
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-04-13 22:45:47 +02:00
Davide Madrisan
25335bb402 templates: kde4: Move %debug_package macro after all %description blocks
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-04-13 22:36:57 +02:00
Davide Madrisan
42c9a323e2 templates: several minor fixes and improvements
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2012-04-10 23:42:12 +02:00
88 changed files with 7363 additions and 4576 deletions

View File

@ -3,7 +3,7 @@ Davide Madrisan <davide.madrisan(a)gmail.com>
frontend, plugins, libraries, documentation
porting to the libspec.lib architecture
Stefano Cotta Ramusino aka "whitone" <whitone(a)openmamba.org>
Stefano Cotta Ramusino aka "whitone" <stefano.cotta(a)openmamba.org>
patch to check for OSI approved licenses
list of OSI approved licenses
autospec package search engine (APSE)

999
ChangeLog

File diff suppressed because it is too large Load Diff

120
Makefile
View File

@ -1,5 +1,5 @@
# Makefile for autospec
# Copyright (C) 2004-2008,2011 by Davide Madrisan <davide.madrisan@gmail.com>
# Copyright (C) 2004-2008,2011,2012 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
@ -17,7 +17,6 @@
include VERSION
include Makefile.env
PACKAGE = autospec
FRONTEND = $(PACKAGE)
PACKAGE_LIB = libspec.lib
@ -30,8 +29,8 @@ dist_archive = $(distdir).tar.bz2
DESTDIR =
pck_conf = $(PACKAGE).conf
pck_root := $(sort $(patsubst %.in,%,$(wildcard *.in)))
pck_confs := $(sort $(patsubst %.in,%,$(wildcard conf/*)))
pck_libs := $(sort $(patsubst %.in,%,$(wildcard lib/*)))
pck_manpages := $(patsubst %.in,%,$(wildcard man/*.in man/*/*.in))
pck_plugins := $(sort $(patsubst %.in,%,$(wildcard plugins/*)))
@ -39,7 +38,7 @@ pck_templates := $(sort $(patsubst %.in,%,$(wildcard templates/*)))
pck_tests := $(sort $(patsubst %.in,%,$(wildcard tests/*)))
pck_tools := $(sort $(patsubst %.in,%,$(wildcard tools/*)))
pck_infiles := $(wildcard *.in lib/*.in man/*.in man/*/*.in plugins/*.in templates/.in tests/* tools/*.in)
pck_infiles := $(wildcard *.in conf/*.in lib/*.in man/*.in man/*/*.in plugins/*.in templates/.in tests/* tools/*.in)
.SUFFIXES:
.SUFFIXES: .in
@ -50,7 +49,7 @@ pck_infiles := $(wildcard *.in lib/*.in man/*.in man/*/*.in plugins/*.in templat
s,@release@,$(RELEASE),g;\
s,@frontend@,$(FRONTEND),g;\
s,@pck_lib@,$(PACKAGE_LIB),g;\
s,@pck_conf@,$(pck_conf),g;\
s,@confdir@,$(confdir),g;\
s,@libdir@,$(libdir),g;\
s,@sysconfdir@,$(sysconfdir),g;\
s,@plugindir@,$(plugindir),g;\
@ -63,24 +62,36 @@ 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
install-frontend: $(PACKAGE) $(pck_conf)
install-frontend: $(PACKAGE)
@echo "Installing frontend..."
@$(INSTALL_DIR) $(DESTDIR)$(bindir)
$(INSTALL_SCRIPT) $(PACKAGE) $(DESTDIR)$(bindir)/$(PACKAGE)
@echo "Installing configuration file..."
@$(INSTALL_DIR) $(DESTDIR)$(sysconfdir)
$(INSTALL_DATA) $(pck_conf) $(DESTDIR)$(sysconfdir)/$(pck_conf)
install-confs: $(pck_confs)
@echo "Installing configuration files..."
@$(MAKE) install -C conf || exit 1
install-libs: $(pck_libs)
@echo "Installing libraries..."
@ -115,6 +126,7 @@ install-tools: $(pck_tools)
$(MAKE) install -C tools || exit 1
install: install-frontend \
install-confs \
install-libs \
install-manpages \
install-plugins \
@ -126,69 +138,42 @@ install: install-frontend \
uninstall:
@echo "Uninstalling all the files..."
rm -f $(DESTDIR)$(bindir)/$(PACKAGE)
rm -f $(DESTDIR)$(sysconfdir)/$(pck_conf)
@for f in $(pck_libs); do\
echo "rm -f $(DESTDIR)$(libdir)/$${f##*/}";\
rm -f $(DESTDIR)$(libdir)/$${f##*/};\
done
@for f in $(pck_plugins); do\
echo "rm -f $(DESTDIR)$(plugindir)/$${f##*/}";\
rm -f $(DESTDIR)$(plugindir)/$${f##*/};\
done
@for f in $(pck_templates); do\
echo "rm -f $(DESTDIR)$(templatedir)/$${f##*/}";\
rm -f $(DESTDIR)$(templatedir)/$${f##*/};\
done
@for f in $(pck_tests); do\
echo "rm -f $(DESTDIR)$(testdir)/$${f##*/}";\
rm -f $(DESTDIR)$(testdir)/$${f##*/};\
done
@for f in $(pck_tools); do\
echo "rm -f $(DESTDIR)$(tooldir)/$${f##*/}";\
rm -f $(DESTDIR)$(tooldir)/$${f##*/};\
done
$(MAKE) uninstall -C conf
$(MAKE) uninstall -C lib
$(MAKE) uninstall -C plugins
$(MAKE) uninstall -C templates
$(MAKE) uninstall -C tests
$(MAKE) uninstall -C tools
@for loc in $(LOCALES); do\
$(MAKE) uninstall -C man/$$loc || exit 1;\
$(MAKE) uninstall -C po/$$loc || exit 1;\
$(MAKE) uninstall -C man/$$loc;\
$(MAKE) uninstall -C po/$$loc;\
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)
@echo "Creating the compressed tarball..."
@$(INSTALL_DIR) history
tar cf - --exclude=history --exclude=.git \
-C .. $(distdir) |\
bzip2 -9 -c > history/$(dist_archive)
@echo "Creating a temporary copy of the entire repository..."
@tmpdir=`mktemp -q -d -t $(PACKAGE)-dist.XXXXXXXX`;\
[ $$? -eq 0 ] || \
{ echo "cannot create a temporary directory"; exit 1; };\
$(INSTALL_DIR) $$tmpdir/$(PACKAGE)-$(VERSION);\
find . -mindepth 1 \( -name .git -o -name history \) \
-prune -o \( \! -name *~ -print0 \) | \
cpio --quiet -pmd0 $$tmpdir/$(PACKAGE)-$(VERSION)/;\
currdir="`pwd`";\
echo "Creating the compressed tarball...";\
pushd $$tmpdir/$(PACKAGE)-$(VERSION)/ >/dev/null;\
tar cf - -C .. $(PACKAGE)-$(VERSION) |\
bzip2 -9 -c > "$$currdir"/history/$(dist_archive);\
[ -f "$$currdir/history/$(dist_archive)" ] && \
echo "Wrote: $$currdir/history/$(dist_archive)";\
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)
@ -196,6 +181,7 @@ clean: mostlyclean
mostlyclean:
@echo "Cleaning up unpackaged files..."
@rm -f $(pck_root)
@$(MAKE) clean -C conf || exit 1
@$(MAKE) clean -C lib || exit 1
@$(MAKE) clean -C plugins || exit 1
@$(MAKE) clean -C templates || exit 1
@ -205,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

@ -1,5 +1,5 @@
# Makefile for autospec
# Copyright (C) 2008 by Davide Madrisan <davide.madrisan@gmail.com>
# Copyright (C) 2008,2012 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
@ -19,6 +19,7 @@ sysconfdir = /etc
tmpdir = /tmp
exec_prefix = $(prefix)
bindir = $(exec_prefix)/bin
confdir = $(sysconfdir)/autospec.d
datadir = $(prefix)/share
libdir = $(datadir)/autospec/lib
localedir = $(datadir)/locale
@ -35,3 +36,4 @@ INSTALL_SCRIPT = ${INSTALL_PROGRAM}
INSTALL_DATA = ${INSTALL} -m 644
INSTALL_DIR = ${INSTALL} -d -m 755
PACKAGE = autospec

606
NEWS
View File

@ -1,3 +1,595 @@
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
* autospec, all the plugins - Davide Madrisan:
Add the option '-C|--config' for selecting a different user configuration
file or list of user configuration files (wilcards are allowed).
(Feature asked by Silvan Calarco and required by openmamba webbuild)
-- Update
* autospec - Davide Madrisan:
Add more debug messages.
-- Bug Fixes
* autospec - Davide Madrisan:
Fix parsing of command line arguments containing spaces.
(Bun introduced in version 1.14.2)
* lib/libapse.lib - Silvan Calarco:
Fix some version comparison errors by specifying numbers base.
* pck-update - Davide Madrisan:
Fix a string translation by adding the missing '$' prefix.
-------------------------------------------------------------------------------
List of user visible changes in the release 1.14.2
-- Improvement
* autospec, autospec,conf, plugins, libmsgmng.lib - Davide Madrisan:
Completely rewrite the code that manage colorized output.
Colors are no more hardcoded in libmsgmng.lib but located in the color
scheme files:
/etc/autospec.d/color-theme.<color-scheme>
A user can add a customized color theme by adding the file:
~/.autospec.d/color-theme.<color-scheme>
-- Update
* autospec - Davide Madrisan:
Deprecate the option '--colorize'.
This option is now replaced by the option '--colors':
--colors <color-theme>
* italian manpage - Davide Madrisan:
Update italian manpage and document the new extensions.
-------------------------------------------------------------------------------
List of user visible changes in the release 1.14.1 - _TO*Hacklab release
-- Improvement
* spec-create - Davide Madrisan:
New option '--changeglog'.
* templates/standard - Davide Madrisan:
Add a devel subpackage.
* lib/libmsgmng.lib - Davide Madrisan:
Allow users to modify ESC, CRIT, NOTE, WARN, EXIT, and NORM color codes.
(A feature asked by Silvan for the openmamba webbuild service).
-- Bug Fixes
* pck-update - Silvan Calarco:
Action 6: restore build requirement detection for *.so requirements.
* config-getvar, lib/libcfg.lib - Davide Madrisan:
Minor fix: incorrect list of default files in the help message.
-- Update
* po/it/* - Davide Madrisan:
The italian translation files have been updated.
* conf/autospec.conf - Davide Madrisan:
Better documentation for terminal (and web) color setup.
-------------------------------------------------------------------------------
List of user visible changes in the release 1.14.0
-- Improvement
* Makefile - Davide Madrisan:
Modify the 'dist' directive to allow 'make dist', 'make dist-rpm', and
'make dist-rpm-install' from a cloned git archive.
* pck-update - Davide Madrisan:
Action 3,5: support package update from git repositories.
-- Bug Fixes
* autospec.spec - Davide Madrisan:
Add 'make' in the list of build requirement.
* plugins/pck-update.in - Davide Madrisan:
Support URL ('Source' tag in the specfile) containing the letter '&'.
(Problem pointed out by Silvan Calarco.)
* pck-update - Silvan Calarco:
Try to avoid reporting package requirements set with 'Requires:' as build
requirements to avoid breaking stage1 builds and causing unneeded circular
dependencies.
(Patch by Silvan Calarco)
* lib/libnetwork.lib - Davide Madrisan:
Minor fix in 'curl.download()'.
* po/it/spec-create.po - Davide Madrisan:
Add missing translations.
-- Update
* autospec.spec - Davide Madrisan:
Make the specfile more distro-agnostic.
Update the list of requirements for subpackages.
* tests/test01_pkgquality - Davide Madrisan:
Do not use the operator '|&' to be at least bash 3.2 compatible.
* lib/libnetwork.lib - Davide Madrisan:
Clone the entire git repository when the option '--preserve-dot-git' is
selected by user.
* lib/libnetwork.lib - Davide Madrisan:
Print an informational message before creating the source compressed
tarball. This may take a while.
* lib/libnetwork.lib - Davide Madrisan:
New helper function: 'git.download()'.
* po/it/pck-update.po - Davide Madrisan:
Updated.
-------------------------------------------------------------------------------
List of user visible changes in the release 1.12.5
-- Improvement
* lib/libnetwork.lib - Davide Madrisan:
git.create_tarball: execute 'git clone --depth=1' insted of 'git clone' to
only clone the last commit instead of the whole repository.
(Thanks to Silvan Calarco for spotting this.)
* spec-create - Davide Madrisan:
specfile.create: modify the 'Source' tag by including a parsable git URL.
(Feature asked by Silvan Calarco.)
-- Bug Fixes
* lib/libnetwork.lib - Davide Madrisan:
git.create_tarball: fix a typo (it_branch --> $git_branch) in the code that
creates the comment "## GITSOURCE".
-------------------------------------------------------------------------------
List of user visible changes in the release 1.12.4
-- Improvement
* test/test01_pkgquality - Davide Madrisan:
Add the mime type of the files shown in the warning and error messages.
* spec-create - Davide Madrisan:
Display in the help the creation of a specfile for git-based projects.
* spec-create, lib/libnetwork.lib - Madrisan:
Add aupport for git branches in spec-create by adding the new options
'--git-branch' and '--preserve-dot-git'.
-------------------------------------------------------------------------------
List of user visible changes in the release 1.12.3
-- Improvement
* pck-update - Davide Madrisan:
Action 4: allow developers to update the distribution-ID when updating the
release number.
Example: 1mamba --> 2mamba2
(when DISTRO_rpm="mamba2" is set in the configuration files).
* libapse.lib, conf/03-apse.conf - Stefano Cotta Ramusino:
Fix scraping values and add new sites
-- Update
* conf/02-specfile-formatting-rules.conf - Davide Madrisan:
New default value for 'library_name_structure' ("").
The name of library packages has no predefined structure.
The previous value ("^lib") was unnecessarily too strict.
-------------------------------------------------------------------------------
List of user visible changes in the release 1.12.2
-- Improvement
* pck-update - Davide Madrisan:
Skip unnecessary checks when pck-update is invoked with the option
'--list-check'.
* pck-update - Davide Madrisan:
Action 6: new option '--update-autobuildreq' which replace a block
'AUTOBUILDREQ-BEGIN' ... 'AUTOBUILDREQ-END' by an updated one.
-- Update
* templates/kde4
Update the list of requirements and build requirements.
* italian manpage - Davide Madrisan:
Improve the examples for 'autospec -u'.
-------------------------------------------------------------------------------
List of user visible changes in the release 1.12.1
-- Update
* conf/02-specfile-formatting-rules.conf - Davide Madrisan:
Update 'source0_name_structure' to allow *.tar.xz archives.
* conf/06-security-system-library-paths.conf - Davide Madrisan:
allowed_libdirs: replace /opt/kde4/lib with /opt/kde/lib to avoid false
positives when scanning kde4 packages.
-------------------------------------------------------------------------------
List of user visible changes in the release 1.12.0
-- Bug Fixes
* pck-update - Davide Madrisan:
Stop pck-update execution with an error code when 'specfile.newrelease()'
reports an error.
(Bug reported by Silvan Calarco.)
* autospec.conf - Davide Madrisan:
format_unpackaged_file_list: fix rpm variable expansion for /lib and
/lib64.
(As usual: bug reported by Silvan Calarco.)
* templates/{library,standard,standard-daemon} - Davide Madrisan:
Add the missing requirement: "Requires(preun): %{__install_info}"
* spec-create - Davide Madrisan:
Select makefile as build_techology when a makefile (downcase letters) or a
GNUmalefile is found, not only a Makefile (with a capital letter).
(Bug reported by Silvan Calarco.)
* pck-update - Davide Madrisan:
The option '--ignore-test' works now as expected.
-- Update
* configuration files - Davide Madrisan:
autospec.conf has been splitted into several configuration files located
in the directory /etc/autospec.d/
* po/it/*.po - Davide Madrisan:
The italian translation files have been updated.
* tests/test01_pkgquality, tests/test02_pkgsecurity - Davide Madrisan:
Rework output by adding the numbering of tests.
* test/test00_specsyntax - Davide Madrisan:
New test file 'test00_specsyntax'.
Move code to check specfiles from 'pck-update' (action 4) to this new test
file.
-- Improvement
* pck-update - Davide Madrisan:
Check specfiles for CR and CRLF line terminators.
They can mislead the specfile parser.
(Issue reported by Silvan Calarco.)
* tests/test01_pkgquality - Davide Madrisan:
New test: check for libraries with undefined symbols after relocation.
* lib/libtest.lib - Davide Madrisan:
New library containing the test framwork code and functions.
* test/test{00_specsyntax,01_pkgquality,02_pkgsecurity} - Davide Madrisan:
Unify the output of all the modules' test.
-- Documentation
* TODO - Davide Madrisan:
Remove out of date stuff out of date stuff.
* autospec-it-HOWTO - Davide Madrisan:
Remove this document (mostly obsolete).
* italian manpage:
Update/improve the italian manpage by merging part of the italian HOWTO.
-------------------------------------------------------------------------------
List of user visible changes in the release 1.10.0
-- Improvement
* spec-create - Davide Madrisan:
Specfile can now be created directly from a git repository.
Here an example:
autospec -s git://git.kernel.org/pub/scm/utils/cpu/mce/mcelog.git \
-o mcelog.spec
* spec-create - Davide Madrisan:
Add a "## GITSOURCE" comment containing the URL of the git repository.
This information will instruct pck-update on how to update the package.
-- Update
* lib/libnetwork.lib - Davide Madrisan:
Do not require 'host'. Just display a warning message when not available.
This tool (and the package 'bind-utils') is not available in early stage
platform development.
(Asked by Silvan Calarco.)
* autospec.spec - Silvan Calarco:
Do not require '/usr/bin/host' in early stage platform development.
-- Bug Fixes
* pck-update - Davide Madrisan:
specfile.newrelease(): do not ignore the release set by user at command
line. (Bug discovered by Silvan Calarco).
-- Update
* pck-update, lib/libnetwork.lib - Davide Madrisan:
Action 0: the search with regular expressions is now case insensitive.
-------------------------------------------------------------------------------
List of user visible changes in the release 1.9.4
-- Improvement
* pck-update, lib/libnetwork.lib - Davide Madrisan:
Action 0: reworked to understand regular expressions.
Example: autospec -u "^kde4-.*" -a0
-- Bug Fixes
* templates/{gnome,kde*,library,standard,standard-daemon} - Davide Madrisan:
Move the %debug_package macro after all %description blocks.
-- Update
* templates/* - Davide Madrisan:
Remove 'Patch0' and '#%patch0 -p1' directives.
These lines may be misunderstood by novice users.
-------------------------------------------------------------------------------
List of user visible changes in the release 1.9.3
-- Improvement
@ -271,15 +863,15 @@ List of user visible changes in the release 1.6.3
-- Bug fixes
* libcfg.cfg - Davide Madrisan
Display a correct error message when the user configuration file is not
available.
* libcfg.cfg - Davide Madrisan
Display a correct error message when the user configuration file is not
available.
-- documentation
-- Documentation
* italian manpage:
Document the new option '--force-download'.
Minor updates.
* italian manpage:
Document the new option '--force-download'.
Minor updates.
-------------------------------------------------------------------------------

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).

135
TODO
View File

@ -31,138 +31,3 @@ ftp_srpms_dir.
ciao,
Silvan
--
mambaSoft di Silvan Calarco - http://www.mambasoft.it
-- spec-create plugin ---------------------------------------------------------
check for non standard (/usr/lib) library files path
====================================================
SOME EXAMPLES
=============
software main-pck devel-pck
-------------------------------------------------------------------------------
a52dec-0.7.4 %{_libdir}/*.so.* %{_libdir}/*.a
%{_libdir}/*.la
%{_libdir}/*.so
liba52/Makefile.am
lib_LTLIBRARIES = liba52.la
liba52_la_SOURCES = bitstream.c imdct.c bit_allocate.c parse.c downmix.c
liba52_la_LIBADD = @LIBA52_LIBS@ -lm
liba52_la_LDFLAGS = -no-undefined
liba52/Makefile.am
noinst_LIBRARIES = libao.a
libao_a_SOURCES = audio_out.c float2s16.c ... \ ...
src/Makefile.am
a52dec_LDADD = $(top_builddir)/liba52/liba52.la \
$(top_builddir)/libao/libao.a @LIBAO_LIBS@
software main-pck devel-pck
---------------------------------------------------------------------------------------
libavifile-0.7.41 %{_libdir}/*.so.* %{_libdir}/*.a
%{_libdir}/avifile-0-7/*.a %{_libdir}/*.la
%{_libdir}/avifile-0-7/*.la %{_libdir}/*.so
%{_libdir}/avifile-0-7/*.so %{_libdir}/pkgconfig/avifile.pc
%{_libdir}/avifile-0.7/vidix/*.a
%{_libdir}/avifile-0.7/vidix/*.la
%{_libdir}/avifile-0.7/vidix/*.so
drivers/libdha/Makefile.am
if AMM_USE_VIDIX
if AMM_LINK_SHARED
lib_LTLIBRARIES = libaviplaydha.la
else
noinst_LTLIBRARIES = libdha.la
endif
endif
libaviplaydha_la_SOURCES = $(DHA_SRC)
libaviplaydha_la_LDFLAGS = -release $(AVIFILE_MAJOR_VERSION).$(AVIFILE_MINOR_VERSION) -version-info 0:$(AVIFILE_MICRO_VERSION):0
libdha_la_SOURCES = $(DHA_SRC)
drivers/vidix/drivers/Makefile.am
pkglibdir = $(libdir)/$(PACKAGE)/vidix
if AMM_USE_VIDIX
VIDIX_DRIVERS = \
libgenfb.la \
libmach64.la \
libmga_crtc2.la \
libmga.la \
libpm3.la \
libradeon.la \
librage128.la
endif
pkglib_LTLIBRARIES = $(VIDIX_DRIVERS)
VIDLIBS = $(LINK_LIBDHA) -lm
VIDLDFLAGS = -module -avoid-version
libgenfb_la_SOURCES = genfb_vid.c
libgenfb_la_LIBADD = $(VIDLIBS)
libgenfb_la_LDFLAGS = $(VIDLDFLAGS)
libmach64_la_SOURCES = mach64_vid.c
libmach64_la_LIBADD = $(VIDLIBS)
libmach64_la_LDFLAGS = $(VIDLDFLAGS)
...
software main-pck devel-pck
---------------------------------------------------------------------------------------
libimlib2-1.1.0 %{_libdir}/*.so.* %{_libdir}/*.a
%{_libdir}/loaders/filter/*.so %{_libdir}/*.la
%{_libdir}/loaders/image/*.so %{_libdir}/*.so
%{_libdir}/loaders/filter/*.a
%{_libdir}/loaders/filter/*.la
%{_libdir}/loaders/image/*.a
%{_libdir}/loaders/image/*.la
libltdl/Makefile.am
if INSTALL_LTDL
include_HEADERS = ltdl.h
lib_LTLIBRARIES = libltdl.la
else
noinst_HEADERS = ltdl.h
endif
if CONVENIENCE_LTDL
noinst_LTLIBRARIES = libltdlc.la
endif
libltdl_la_SOURCES = ltdl.c
libltdl_la_LDFLAGS = -no-undefined -version-info 3:0:0
libltdl_la_LIBADD = $(LIBADD_DL)
libltdlc_la_SOURCES = ltdl.c
libltdlc_la_LIBADD = $(LIBADD_DL)
## Because we do not have automatic dependency tracking:
ltdl.lo: ltdl.h config.h
src/Makefile.am
lib_LTLIBRARIES = libImlib2.la
libImlib2_la_SOURCES = scale.c ... \ ...
libImlib2_la_LDFLAGS = -version-info 2:0:1
if HAVE_MMX
libImlib2_la_LIBADD = $(X_OBJS) @DLLDFLAGS@ $(MMX_OBJS) \
$(top_builddir)/libltdl/libltdlc.la \
$(x_libs) $(freetype_libs) $(LDFLAGS)
libImlib2_la_DEPENDENCIES = $(top_builddir)/config.h $(X_OBJS) $(MMX_OBJS)
else
libImlib2_la_LIBADD = $(X_OBJS) @DLLDFLAGS@ \
$(top_builddir)/libltdl/libltdlc.la \
$(x_libs) $(freetype_libs) $(LDFLAGS)
libImlib2_la_DEPENDENCIES = $(top_builddir)/config.h $(X_OBJS)
endif
SYS_LOADERS_PATH = @pkglibdir@

View File

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

View File

@ -1,583 +0,0 @@
autospec HOWTO: Guida alla creazione e manutenzione di rpm con autospec
Davide Madrisan, 13 ottobre 2008
Questo documento descrive come creare ed aggiornare pacchetti rpm con
`autospec', la suite di script e moduli bash che permette di velocizzare ed
automatizzare una buona parte delle operazioni necessarie alla gestione dei
pacchetti rpm, nonchè al controllo del loro livello qualitativo ed alla
ricerca di comuni problemi di sicurezza. Autospec è stato utilizzato con
successo dagli sviluppatori delle distribuzione Linux
- QiLinux (http://www.qilinux.org)
- openmamba (http://www.openmamba.org).
Aggiornato alla versione 1.4.0 di autospec
1. Introduzione
Autospec è nato con l'intento di facilitare e sveltire le attività di
creazione e aggiornamento dei pacchetti di distribuzioni Linux basate sul
sistema di pacchettizzazione rpm. In particolare è stato in primis il tool
di QiLinux che ha permesso la creazione di specfile standard e
l'aggiornamento ed update (semi)automatico dei pacchetti già presenti nella
distribuzione QiLinux, in particolare dei pacchetti presenti nei rami
sviluppo `devel' e `devel-contrib', il ramo dei contributori esterni.
E' ora il sistema principale di manutenzione dei pacchetti adottato dagli
sviluppatori della distribuzione openmamba.
Autospec è stato strutturato in modo modulare e parametrizzato in ogni suo
aspetto e componente per permettere il suo utilizzo in qualsiasi
distribuzione basata sul sistema di pacchetti rpm, mediante la sola modifica
dei valori assegnate alle variabili presenti nel file di configurazione.
1.1. Licenza
autospec-it-HOWTO - copyright (C) 2004-2008 by Davide Madrisan.
E' concessa la copia, la distribuzione e/o modifica di questo documento
nei termini della licenza `GNU Free Documentation License', versione 1.1
od ogni successiva versione pubblicata dalla Free Software Foundation,
senza variazione delle sezioni, senza testi di Front-Cover o di
Back-Cover.
Una copia della licenza è disponibile presso
http://www.gnu.org/copyleft/fdl.html
1.2. Perchè questo documento?
Questo documento è stato creato per fornire alcune linee guida a coloro
che vogliono creare e mantenere pacchetti rpm con la suite di script
autospec. In particolare vengono descritte le procedure di creazione e di
upgrade dei pacchetti. Autospec risulta di particolare utilità nella
creazione di librerie e moduli perl ed in genere di rpm di software
pacchettizzati utilizzando gli autotools GNU (automake, autoconf, libtool).
1.3. Nuove versioni di questo documento
Il documento è archiviato sul sito FTP della distribuzione openmamba, in
particolare nel pacchetto sorgente (srpm) di autospec presente nel ramo
devel.
Si è autorizzati ed incoraggiati a spedire domande o commenti su questo
HOWTO e su autospec a Davide Madrisan <davide.madrisan(a)gmail.com>.
2. Come installare il software autospec
Autospec è disponibile in formato tarball ed in formato rpm.
In particolare gli utenti QiLinux 1.1 possono installare il pacchetto con il
comando, eseguito da utente root,
yum install autospec
ed aggiornarlo con il comando, sempre eseguito da utente root,
yum update autospec.
Per gli utenti di QiLinux-devel e QiLinux 1.2pre1 o successive release, e per
gli utenti openmamba è possibile installare o aggiornare autospec mediante il
seguente comando
apt-get install autospec
o alternativamente tramite l'interfaccia grafica `synaptic'.
Durante l'installazione viene creato un file di configurazione
/etc/autospec.conf
che è consigliabile non modificare. Per rendere autospec funzionante e
per personalizzarne il comportamento è necessario creare manualmente il
file
~/.autospec
nella propria cartella home inserendovi i **soli** dati personali e le
opzioni diverse dalle scelte di default presenti nel file principale.
Riportiamo qui di seguito un esempio di file di configurazione utente per
autospec che potrà essere utilizzato da un `contributor' come fac-simile
per creare il proprio file di configurazione personale.
[~/.autospec]
# [configuration file for `autospec']
proxy=
proxy_user=
packager_fullname="<Your Name>"
packager_email="<email>@openmamba.org"
ftp_rw_user[1]="<user>"
ftp_rw_passwd[1]="<passwd>"
arch_list=(i586 ppc arm x86_64)
curl_opts_netlink="--connect-timeout 15 --retry 3 --limit-rate 250k"
3. Funzionamento di autospec
Autospec è costruito da uno script principale di frontend ed una serie di
plugin che effettuano le operazioni di creazione di specfile, di
aggiornamento di pacchetti rpm e di estrazione di file da pacchetti rpm e
srpm. Vi sono inoltre alcune `librerie', cioè moduli contenenti funzioni
utiizzate nei plugin o utilizzabili da script creati da terze parti, su
cui non ci soffermeremo.
Autospec ed i suoi plugin sono script di shell che richiedono bash v2.0.
Il comando
autospec --help
fornisce l'elenco dei comandi disponibili. Analizzaremo nelle sezioni
seguenti alcuni di tali comandi e forniremo esempi pratici di utilizzo
di tali opzioni.
3.1. Come utilizzare autospec per la creazione di specfile
Per creare uno specfile di partenza tramite autospec è necessario
avere il sorgente del software (tarball) che si vuole pacchettizzare.
Utilizzeremo come esempio il tarball del `autospec' stesso, salvato
nella cartella `/usr/src/RPM/SOURCES/'.
La sintassi generica di autospec per la creazione di uno specfile è la
seguente:
autospec -s <tarball> [-n <name>] [-v <ver>] [-t <type>] [-o <outfile>]
dove le precedenti opzioni significano, nell'ordine:
-s, --source Cerca di creare uno specfile per il <tarball> indicato
-n, --pck-name Nome del pacchetto (default: ricavato dal nome del tarball)
-v, --pck-version Versione del pacchetto (default: ricavato dal nome del tarball)
-t, --type Categoria dello specfile da generare
standard : specfile standard (default)
gnome : specfile per pacchetti gnome
kde3 : specfile per pacchetti kde3
kde4 : specfile per pacchetti kde4
library : specfile per librerie
librarytools: specfile per librerie con tool
perl : specfile per singoli moduli perl
python : specfile per moduli python
-o, --output Redirige lo standard output sul file <outfile>
Le opzioni tra parentesi quadre sono opzionali.
Generiamo lo specfile di esempio con il comando:
autospec -s /usr/src/RPM/SOURCES/autospec-1.0.1.tar.bz2 \
-t standard -o /usr/src/RPM/SPECS/autospec.spec
o anche
autospec -s http://ftp.qilinux.it/devel/tools/autospec/autospec-0.8.8.tar.bz2 \
-t standard -o /usr/src/RPM/SPECS/autospec.spec
Viene in questo modo creato il file `/usr/src/RPM/SPECS/autospec.spec' che
contiene le istruzioni per la generazione dei pacchetti rpm e srpm del tool
autospec stesso. Nel secondo caso viene effettuato il download del software
e quindi viene creato lo specfile.
Si noti che nell'esempio è stato scelto il formato `standard' (formato di
default). Altre scelte di formato attualmente disponibili sono
- `library', per la generazione di specfile relativi a librerie,
- `perl', per la generazione di specfile relativi a moduli perl
- `python' per la creazione di specfile per pacchetti python.
Nella directory
/usr/share/autospec/templates
sono presenti i templati degli specfile per le categorie di specfile di cui
sopra.
Si noti ancora che se si omette il comando `-o', il listato dello specfile
verrà visualizzato su standard output.
Consideriamo come ulteriore esempio il comando di creazione dello specfile
della libreria avifile:
autospec -s /usr/src/RPM/SOURCES/avifile-0.7-0.7.40.tar.gz \
-t library -n libavifile -v 0.7.40
In questo caso sono state utilizzate le opzioni `-n' per forzare il nome di
specfile `libavifile' e l'opzione `-v' per forzare la versione `0.7.40'.
Tali parametri infatti non sono ricavabili da autospec in automatico
utilizzando il nome del tarball (avifile-0.7-0.7.40.tar.gz).
Si noti che, trattandosi di una libreria, si è scelto di seguire lo standard
QiLinux/openmamba che richiede che tali pacchetti abbiano sempre il prefisso
`lib'.
Completato manualmente lo specfile con un editor di testo, è possibile creare
i pacchetti rpm e srpm con il comando seguente:
autospec -u libavifile -a5
ed effettuare i test di simulazione di installazione, verifica di presenza di
alcuni tipi di vulnerabilità ed i test di qualità dei pacchetti creati:
autospec -u libavifile -a7,8
ed effettuare l'upload sul sito ftp di QiLinux, con il comando
autospec -u -a10 libavifile
se in possesso del necessario account sul branch `devel-contrib'.
Si noti che se una versione precedente è presente nel repository, questa
verrà rimossa oppure verrà spostata nella cartella `ftpdir_rw_old', se tale
variabile è definita nel/i file di configurazione.
Si veda il paragrafo successivo dove l'opzione `-u' viene esaminata in
dettaglio.
3.2. Come utilizzare autospec per aggiornare pacchetti rpm
Il tool autospec è molto utile durante la fase di aggiornamento di pacchetti rpm.
La sintassi da utilizare è la seguente:
autospec -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] \
[--force-update] [--force-build] [--force-install] \
[--ignore-test t1[,t2,...]] [-c] [-f] [-L] [-R]
dove le opzioni significano:
-u, --update Aggiorna automaticamente il pacchetto <pck>, versione <ver>
-a, --action Esegue la lista di azioni separate da virgole <lst>
0. cerca se il pacchetto è disponibile nei repository
1. download ed installazione del pacchetto srpm
2. controlla se è disponibile un aggiornamento
3. download dei nuovi file sorgente
4. aggiornamento e controllo dello specfile
5. creazione dei pacchetti rpm e srpm
6. creazione della lista dei build requirement
7. simulazione dell'installazione dei pacchetti rpm
8. esecuzione dei test di qualità e sicurezza
9. calcolo dei valori di hashing md5 e sha1
10. upload dei nuovi pacchetti sul sito ftp,
*rimozione* dei vecchi pacchetti dal sito ftp
(backup in `$ftp_rw_old_dir', se definita)
11. installazione dei nuovi pacchetti rpm
--force-update Forza l'aggiornamento dei pacchetti rpm e srpm
--force-build Ricrea comunque i pacchetti rpm e srpm
--force-install Installa i nuovi pacchetti anche in caso di errori rpm
--force Cerca di eseguire comunque le azioni specificate
--ignore-test Non esegue i test indicati (t1[,t2,...])
-d, --define Assegna alle variabili v1,v2,... i valori r1,r2,...
--server-download
Server da utilizzare nel download dei pacchetti
--server-upload Server dove effettuare l'upload dei pacchetti
--server Server per l'upload e il download dei pacchetti
-l, --login User (usr) e password (pswd) per l'upload sul sito FTP
-S, --specfile Nome dello specfile (default: <name>.spec)
-A, --arch Forza un valore per l'architettura
--changelog Scrive il messaggio indicato nel changelog del pacchetto
--nosrpm azione 5: Crea soltanto i pacchetti rpm
azione 10: Non effettua l'upload del pacchetto srpm
--norpm azione 5: Crea soltanto il pacchetto srpm
azione 10: Non effettua l'upload dei pacchetti rpm
-c, --clear Rimuove tutti i file temporanei
-f, --format Abilita la riformattazione dello specfile
-L, --log Abilita il log su file (nella directory: `$logging_dir')
-R, --rebuild Attiva modalità ed impostazioni di rebuild (azione 4)
Per aggiornare ad esempio ad esempio il pacchetto `util-linux' alla versione
2.12b, si esegua il seguente comando:
autospec -u -a1,3:5,7,8 util-linux 2.12b
E' necessario avere una connessione attiva internet poichè verranno eseguiti
i seguenti download:
step 1 : download del pacchetto corrente srpm di `util-linux' dal
primo sito indicato nei file di configurazione, o dal suo
successivo se non trovato, ecc.
step 3 : download del nuovo software, nell'esempio il tarball
`util-linux-2.12b.tar.bz2'.
In particolare, affinchè lo step `3' abbia successo, è necessario che nello
specfile sia specificata una URL completo e valida alla voce `Source' o
`Source0'.
Naturalmente è possibile eseguire solo alcuni degli step precedenti,
utilizzando l'opzione `-a' in modo opportuno.
Segnaliamo in particolare l'opzione `-f' che forza l'autoformattazione dello
specfile secondo lo standard QiLinux. Si noti che viene creata una copia di
backup del precedente specfile, in caso si voglia o debba procedere ad un suo
ripristino.
Se si ha un account in scrittura nel repository `devel' o `devel-contrib' o
un repository personale (come nel caso dei contributor in openmamba) è
possibile infine effettuare l'upload con il comando
autospec -u -a10 util-linux 2.12b
E' anche possibile utilizzare l'opzione `--server-upload' per indicare ad
autospec quale server utilizzare durante l'upload del pacchetti rpm e srpm.
Il parametro intero che questo comando richiede è l'indice del server nel
vettore `ftp_rw_server' (vedi file di configurazione).
Nota: Si noti che il comportamento predefinito di autospec prevede la
rimozione automatica dei vecchi pacchetti dal repository ftp dopo avere
effettuato l'upload delle nuove versioni.
Se tuttavia i precedenti pacchetti sono stati trovati in
`ftpurl_ro_srpms[n]' e `ftpurl_ro_rpms[n]'
e se la variabile `ftpdir_rw_old[n]' è stata configurata con un valore
non vuoto (cioè non ""), invece della rimozione autospec effettuerà il backup
dei pacchetti, utilizzando come directory radice il valore indicato in
`ftpdir_rw_old[n]'. Ad esempio se i pacchetti sono stati trovati in
ftpurl_ro_srpms[0]="ftp://ftp.qilinux.it/pub/QiLinux/devel/SRPMS"
e se sono state inizializzate in ~/.autospec le variabili seguenti
ftp_rw_server[0]="ftp.qilinux.it"
ftpdir_rw_old[0]="/devel/old"
verrà effettuerà il backup dei pacchetti sul server `ftp.qilinux.it'
nella directory /devel/old/<nomepacchetto>_<data><ora>
4. Convenzioni relative agli specfile di QiLinux e openmamba
Vengono qui elencate alcune convenzioni utilizzate negli specfile QiLinux e
openmamba che puntano ad ottenere principalmente una uniformità e facile
leggibilità degli stessi.
1. I file indicati in `Source', `Source0', `Source1', ..., che si
riferiscono a risorse internet (file presenti su server ftp o http)
devono avere indicata l'URL completa. Questo per permettere il loro
download automatico al tool `autospec' ed in generale l'immediata
reperibilità
2. I nomi delle patch dovrebbero avere la seguente struttura:
%{name}-<versione>-<descrizione>.patch
dove '<versione>' indica il numero di versione del software in cui la
patch è stata per la prima volta applicata, e `<descrizione>' indica
una stringa esplicativa dello scopo della patch.
es. %{name}-20040813-winelauncher.patch (wine-20040813)
%{name}-2.0-gcc34.patch (libfaad2-2.0)
%{name}-3.00-freetype2.patch (xpdf-3.00)
%{name}-2.03-fonts.patch
%{name}-3.00-xpdfrc.patch
%{name}-3.00-can-2004-0888.patch
Si noti un particolare l'ultima patch che si riferisce ad un fix di
sicurezza ed in cui è utilizzato come descrizione l'ID del progetto
Common Vulnerabilities and Exposures (CVE).
3. In caso di più patch può essere utile inserire una breve descrizione
delle stesse nel blocco `%prep', se possibile
es. %patch0 -p1 -b .freetype2 (xpdf-3.00)
%patch1 -p1 -b .fonts
%patch2 -p1 -b .xpdfrc
%patch3 -p1 -b .can-2004-0888
4. Nel preambolo dello specfile è necessario inserire tutti i
`BuildRequires' relativi ai pacchetti di sviluppo (devel) richiesti
durante il processo di compilazione. Per far questo occorre
controllare in modo molto attento l'output generato dallo script
`configure', se utilizzato, e la documentazione fornita con il sorgente
(generalmente i file REAME e/o REQUIREMENTS o simili).
Questo permette la ricompilazione dei pacchetti source rpm su computer
diversi da quelli su cui sono stati creati senza problemi e senza
perdita di feature (in molti casi infatti, i check falliti dello script
configure comportano la disabilitazione di feature altrimenti
supportate dal software che si desidera ricompilare).
Nota: questa pratica può significare la necessità di dover creare anche
molti pacchetti supplementari, richiesti dal software principale che si
desidera compilare per inserirlo nella distribuzione. E' bene infatti
che il software abbia attive il maggior numero di feature, in modo da
permettere il suo utilizzo pi generale possibile da parte di un utente
generico.
Nota: Se è installato il pacchetto `sudo' con una configurazione in cui
siano presenti le seguenti righe (file `/etc/sudoers')
# Cmnd alias specification
Cmnd_Alias DISTO_CMD = /usr/bin/apt-get, /bin/rpm
%packager ALL = NOPASSWD: DISTO_CMD
autospec sar<61>in grado di installare automaticamente i build requiremnts
indicati nello specfile.
5. I pacchetti devel devono generalmente avere la voce
`Requires: %{name} = %{version}'
es. %package devel
Summary: Static libraries and headers for %{name}
Group: Development/Libraries
Requires: %{name} = %{version}
6. Utilizzare quando possibile le seguenti macro rpm
%configure
%make
%makeinstall -oppure- %makeoldinstall
in luogo rispettivamente di
./configure \
--prefix %{_prefix} \
--infodir %{_infodir} \ (se presente documentazione info)
--mandir %{_mandir} (se presente documentazione man)
...
make %{?_smp_mflags}
make install DESTDIR=%{buildroot}
make install \
prefix=%{buildroot}%{_prefix} \
exec_prefix=%{buildroot}%{_exec_prefix} \
bindir=%{buildroot}%{_bindir} \
...
Nota1: autospec v0.4.10 e successive versioni utilizzano queste macro
durante la creazione automatica degli specfile.
Nota2: se occorresse utilizzare il compilatore gcc-3.3.x invece di
quello corrente (4.x), è possibile utilizzare in QiLinux e openmamba le
macro `%configure33' e `%make33'.
Altre macro rpm disponibili sono
%install_info
%uninstall_info
Occorre utilizzarle quando nel pacchetto sono presenti pagine info.
Ad esempio (pacchetto `coreutils')
%post
%install_info coreutils.info
%preun
%uninstall_info coreutils.info
exit 0
Ed infine:
%find_lang
da utilizzarsi se il pacchetto supporta l'internazionalizzazione via
`gettext' (file /usr/share/locale/*/LC_MESSAGES/*.mo).
Ad esempio (pacchetto `tar')
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%makeinstall
...
%find_lang %{name}
%files -f %{name}.lang
%defattr(-,root,root)
/bin/tar
...
Si noti come l'argomento `%{name}' della macro `%find_lang' vada
sostituito dal nome effettivo dei file *.mo creati, in quei rari casi
in cui tali file hanno un nome diverso da `%{name}'.
Ad esempio (pacchetti libgtk-2.6.x)
%find_lang gtk20
...
%files -f gtk20.lang
...
Nota: E' necessario utilizzare rpm versione 4.0.4-22qilnx o successive
per potere utilizzare le macro rpm qui descritte.
7. Se si sta creando un pacchetto per modulo perl, sono disponibili
le macro rpm `%perl_sitearch' e `%perl_archlib'.
Il valore di tali variabili si può ottenere con il comando
`rpm --eval=<rpmmacro>'.
Ad esempio:
$ rpm --eval=%perl_archlib
/usr/lib/perl5/5.8.8/i386-linux-thread-multi
Se si sta creando un pacchetto python è possibile utilizzare la
macro `%python_version'
$ rpm --eval=%python_version
2.3
8. Per motivi di sicurezza è opportuno inserire nei blocchi `%prep' e
`%clear' il comando
[ "%buildroot" != / ] && rm -rf "%buildroot"
in luogo dell'istruzione `rm -rf "%buildroot"' o simili.
Questa pratica previente spiacevoli situazioni nel caso in cui i
pacchetti vengano creati dall'utente root (pratica comunque
**assolutamente sconsigliata**) e la variabile `%buildroot' sia
settata in modo errato.
9. Quando si elencano i file contenuto nei vari sottopacchetti,
utilizzare le variabili rpm, se non i nomi delle directory.
Ad esempio, utilizzare `%{_bindir}' in luogo di `/usr/bin',
`%{sbindir}' invece di `/usr/sbin'.
Per sapere quali sono le variabili rpm disponibili, utilizzare il
comando
rpm --showrc
10. Le entry del blocco '%changelog' devono rispettare la struttura
indicata dal seguente esempio:
%changelog
* Thu Aug 26 2004 Davide Madrisan <davide.madrisan@qilinux.it> 20040813-1qilnx
- udpate to 20040813
In particolare deve cioè essere presente il nome e l'indirizzo
mail del packager, seguito dalla versione corrente del pacchetto.
Nota importante: della maggior parte delle convenzioni indicate nei
punti precedenti si occupa 'autospec' in modo automatico.
5. Come contribuire allo sviluppo di autospec
Autospec è un tool in fase di sviluppo e seppur testato lungamente potrete
imbatterervi in bachi oppure trovare che alcune feature che voi reputate
utili siano mancanti.
E' possibile inviare sia bugreport che commenti e suggerimenti per
migliorare autospec al seguente indirizzo
<davide.madrisan(a)gmail.com>
I bug report devono essere dettagliati (versione di autospec, comando
eseguito, file di configurazione se necessario, URL del software, se il
problema riscontrato riguarda la creazione di uno specfile, il suo
aggiornamento, ecc.), in modo da permettere la riproducibilità del problema.
Si veda anche il file BUGS contenente un elenco dei bachi noti e feature da
implementare.
Sono naturalmente ben accette anche le patch.
Per il debugging di un problema potrebbe essere utile utilizzare l'opzione
`--debug' di autospec.
Se si desidera infine contribuire allo sviluppo diretto del tool autospec,
inviare una mail all'indirizzo indicato sopra.
6. Traduzioni
. English <http://will be available ASAP>

View File

@ -1,605 +0,0 @@
# [main configuration file for `@package@']
# SECURITY WARNING: if `ftp_rw_user[*]' and `ftp_rw_passwd[*]' are set,
# this file should be only readable by the `$packager_group' group, if any
#
# *** DO NOT EDIT THIS FILE ***
# *** It will be overwritten at the next update ***
#
# Create a configuration file (.autospec) in your home directory instead,
# like this one (please customize all the values)
#
# proxy="proxyhost:8080"
# proxy_user="user:password"
# packager_fullname="Your Name"
# packager_email="email@domain"
# ftp_rw_user[1]="user"
# ftp_rw_passwd[1]="passwd"
# arch_list=(i686 ppc)
# rpm_download_and_install="sudo apt-get --quiet --yes install"
# rpm_install="sudo rpm -hUv"
# rpm_install_force="sudo rpm -hUv --force --nodeps"
# curl_opts_netlink="--connect-timeout 15 --retry 3 --limit-rate 250k"
# Name of the distribution (i.e. "openmamba")
DISTRO="openmamba"
# RPM distribution id (i.e. "mamba" --> pck-1.0-1mamba.i586.rpm)
DISTRO_rpm="mamba"
# Vendor name (i.e. "openmamba")
VENDOR="openmamba"
# Packager full name and email address (used in the Changelog)
packager_fullname=
packager_email=
# System group name for RPM packagers
packager_group="packager"
#------------------------------------------------------------------------------
# Aliases for server numbers (repositories)
ftp_alias[0]=""
ftp_alias[1]="contrib"
# Enable/Disable switch for repositories (enable by default when unset)
ftp_enable[0]=1
ftp_enable[1]=1
# FTP path of RPMS packages (i.e. "ftp://ftp.qilinux.it/pub/QiLinux/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")
# 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")
# - 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)
# - ftp_rw_passive_mode : passive mode (can be "on" or "off" (the default))
# - ftp_rw_rpms_dir : ftp path where RPMS packages will be uploaded
# (i.e. "/RPMS", "/devel-contrib/RPMS")
# - ftp_rw_srpms_dir : ftp path where SRPMS packages will be uploaded
# (i.e. "/SRPMS", "/devel-contrib/RPMS")
#
# WARNING: the entries MUST respect the order used in `ftpurl_ro_rpms'
ftp_rw_server[0]=
ftp_rw_port[0]=
ftp_rw_passive_mode[0]=
ftp_rw_user[0]=
ftp_rw_passwd[0]=
ftp_rw_rpms_dir[0]=
ftp_rw_srpms_dir[0]=
ftp_rw_server[1]="ftp://ftpaccounts.openmamba.org"
ftp_rw_port[1]=
ftp_rw_passive_mode[1]=on
ftp_rw_user[1]="devel-contrib"
ftp_rw_passwd[1]="<hidden>"
ftp_rw_rpms_dir[1]="/RPMS.@arch@"
ftp_rw_srpms_dir[1]="/SRPMS.base"
# if no old version of the packages are found in the repositories
# `ftpurl_ro_srpms', use this one as default repository
# (its value is the index of `ftp_rw_server', default: `1')
ftp_rw_server_num_default=1
# FTP directories where old packages will be moved for backup
# (i.e. "/devel/old", "")
# IMPORTANT: SAME SIZE and ORDER as `ftp_rw_rpms_dir[]'
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[1]="i586"
# where to upload noarch packages
# (should be "noarch" to upload them only to the noarch subtree, or
# "${arch_list[n]}" to upload them to all the architecture subtrees
# defined for the branch <n>
arch_noarch_upload[0]="${arch_list[0]}"
arch_noarch_upload[1]="${arch_list[1]}"
#------------------------------------------------------------------------------
# Options used by curl while dowloading source files
# (default: "--connect-timeout 15 --retry 3")
# If you'd like your transfer not use your entire bandwidth you can use the
# `--limit-rate' option (for instance `--limit-rate 250k')
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"
proxy=""
# Sintax for 'proxy_user': "user:password"
proxy_user=""
# Commands to run when a rpm package must be automatically installed
# (NOTE: it could be necessary to manually configure sudo
# here an example (works for QiLinux and openmamba):
# Cmnd_Alias DISTRO_CMD = /usr/bin/apt-get, /bin/rpm
# %packager ALL = NOPASSWD: DISTRO_CMD
# (of course your user must belong to the `packager' group)
# 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"
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=''
# Mask that identify packages providing localization...
# - default value='-i18n-|-help-'
rpm_install_l10n_pck_mask='-i18n-|-help-'
# ...and only install localization packages matching this regular expression
# - default value='.*' (can be for instance 'it|pl')
rpm_install_l10n_pck_allow_lang_mask='.*'
# Options passed to rpm when installing a source rpm (srpm)
# - default value='--nodeps'
srpm_install_options='--nodeps'
# Path of the some tools commonly used in the specfiles
path_ldconfig="/sbin/ldconfig"
path_installinfo="/sbin/install-info"
#------------------------------------------------------------------------------
# Default values for some strings used in the plugins
# - default value for `Summary id'
summary_defvalue="... package summary"
# - default value for `Group id'
group_defvalue="... package group"
# - default value for `URL id'
url_defvalue="... package URL"
# - default value for `License id'
license_defvalue="... package license"
# - default value for `%description'
description_defval="... package description"
# - default value for `%description devel'
description_devel_defval="... devel package description"
# - default value for `%changelog'
changelog_samever_defvalue="... add a changelog entry"
# - default value for `%changelog' when updating a package to the same version
changelog_rebuild_defvalue="rebuilt"
changelog_userdef=""
# Allowed paths for system libraries
allowed_libdirs="\
/lib:/usr/lib:/usr/lib/qt3/lib:/usr/lib/qt4/lib:/opt/kde3/lib:/opt/kde4/lib"
# Some specfile groups and summary entries
library_group="System/Libraries"
library_summary="Static libraries and headers for %{name}"
library_group_devel="Development/Libraries"
library_group_perl="System/Libraries/Perl"
python_modules_group="System/Libraries/Python"
# Paths used in the autogenerated specfiles
#python_install_lib_path="%{_libdir}/site-python"
python_install_lib_path="%{python_sitearch}"
# File extensions for compressed man/info pages (`/usr/lib/rpm/brp-compress')
man_compress_ext=".gz"
info_compress_ext=$man_compress_ext
# Set to modify the way man pages in the autogenerated specfile are written
# "0" : all the entries (this is the default)
# "1" : one entry for each man page section
# "2" : only one entry for all the man pages
man_condensed_list=0
# Set to modify the way info pages in the autogenerated specfile are written
# "0" : all the entries (this is the default)
# "2" : only one entry for all the info pages
info_condensed_list=0
# Libraries, perl, and python modules names should have a fixed structure?
# Default values are "^lib" for libraries, "^perl-" for perl modules, and
# "^python-" for python modules. If you don't want to fix a structure for
# one of these packages, set the corresponding variable to ""
library_name_structure="^lib"
perl_module_name_structure="^perl-"
#python_module_name_structure="^python-"
python_module_name_structure=""
# Structure for the names of the patches (Patch[0-9]* ids)
# Default value: "^%\{name\}-[0-9][\.0-9a-z]*-[a-zA-Z0-9_-]+*.patch[\.gzb2]*",
# that is '%{name}-pck_version_when_first_applied-short_description.patch'
# If you don't want to fix a structure use ""
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\)"
# 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\|shar\.gz\|zip\)"
# RPM macros for common packaging actions
rpm_macro_configure="%configure"
rpm_macro_makeinstall="%makeinstall"
# NOTE: the `make' and `makeoldinstall' are not standard rpm macros
# if are unsupported in the rpm tool you're using, you may use these settings:
# - rpm_macro_make=""
# - rpm_macro_makeoldinstall="%makeinstall"
rpm_macro_make="%make"
rpm_macro_makeoldinstall="%makeoldinstall"
# A (non standard) macro for perl modules (unset if not used)
rpm_macro_makeinstall_perl="%makeinstall_perl"
# RPM macros used to install and remove info pages
rpm_macro_installinfo="%install_info"
rpm_macro_uninstallinfo="%uninstall_info"
rpm_macro_installinfo_binary="%{__install_info}"
# RPM macros for cmake
# Default value: "%cmake -d build" (out-of-source builds)
# NOTE (in-source builds)
# rpm_macro_cmake="%cmake"
# rpm_macro_makeinstall_cmake="%makeinstall"
rpm_macro_cmake="%cmake -d build"
rpm_macro_makeinstall_cmake="%makeinstall -C build"
# RPM macros miscellaneous
# - rpm_macro_pyver: python version number
rpm_macro_pyver="%python_version"
# allowed groups
rpm_allowed_groups=(
Applications/Accessibility
Applications/Archiving
Applications/Communication
Applications/Databases
Applications/Development
Applications/Educational
Applications/Emulators
Applications/File
Applications/Fonts
Applications/Games
Applications/Graphics
Applications/Mathematics
Applications/Multimedia
Applications/Networking
Applications/Publishing
Applications/Scientific
Applications/Security
Applications/Shells
Applications/Spelling\ Checker
Applications/Text
Applications/Web
Development/Applications
Development/Bindings
Development/Debug
Development/Kernel
Development/Languages
Development/Libraries
Development/Libraries/Java
Development/Libraries/Perl
Development/Libraries/Python
Development/Tools
Documentation
Graphical\ Desktop/Applications/Accessibility
Graphical\ Desktop/Applications/Administration
Graphical\ Desktop/Applications/Archiving
Graphical\ Desktop/Applications/Configuration
Graphical\ Desktop/Applications/Databases
Graphical\ Desktop/Applications/Development
Graphical\ Desktop/Applications/Educational
Graphical\ Desktop/Applications/Environment
Graphical\ Desktop/Applications/Games
Graphical\ Desktop/Applications/Graphics
Graphical\ Desktop/Applications/Internet
Graphical\ Desktop/Applications/Multimedia
Graphical\ Desktop/Applications/Networking
Graphical\ Desktop/Applications/Office
Graphical\ Desktop/Applications/Other
Graphical\ Desktop/Applications/Publishing
Graphical\ Desktop/Applications/Scientific
Graphical\ Desktop/Applications/Security
Graphical\ Desktop/Applications/Utilities
Graphical\ Desktop/Fonts
Graphical\ Desktop/Libraries/GNOME
Graphical\ Desktop/Libraries/QT
Graphical\ Desktop/Libraries/KDE
Graphical\ Desktop/Look\ \'n\'\ feel
Graphical\ Desktop/Look\ \'n\'\ feel/Themes
Graphical\ Desktop/Look\ \'n\'\ feel/Screensavers
Installation/Update
Network/File\ Transfer
Network/File\ Systems
Network/High Availability
Network/Libraries
Network/Monitoring
Network/Routing
Network/Security
System/Benchmarks
System/Clustering
System/Configuration
System/Database
System/Kernel\ and\ Hardware
System/Kernel\ and\ Hardware/Drivers
System/Fonts
System/Hardware
System/Internationalization
System/Libraries
System/Libraries/Java
System/Libraries/Perl
System/Libraries/PHP
System/Libraries/Python
System/Management
System/Multimedia
System/Servers
System/Spooling
System/Telephony
System/Tools
System/X11)
# approved licenses
rpm_approved_licenses=(
Academic\ Free\ License\ 3.0
Adaptive\ Public\ License
Affero\ GNU\ Public\ License
Apache\ License
Apache\ License\ 2.0
Apple\ Public\ Source\ License
Artistic
Attribution\ Assurance\ Licenses
Boost\ Software\ License
BSD
Common\ Development\ and\ Distribution\ License
Common\ Public\ Attribution\ License\ 1.0
Computer\ Associates\ Trusted\ Open\ Source\ License\ 1.1
Copyright\ only
CUA\ Office\ Public\ License\ 1.0
Eclipse\ Public\ License
Educational\ Community\ License
Eiffel\ Forum\ License\ 2.0
Entessa\ Public\ License
EU\ Datagrid\ Software\ License
European\ Union\ Public\ License
Fair\ License
Frameworx\ License
GPL
Historical\ Permission\ Notice\ and\ Disclaimer
IBM\ Public\ License
IEEE
IPA\ Font\ License
ISC\ License
LGPL
Lucent\ Public\ License\ 1.02
Microsoft\ Public\ License
Microsoft\ Reciprocal\ License
MirOS Licence
MIT
Motosoto\ License
MPL\ 1.1
NASA\ Open\ Source\ Agreement\ 1.3
Naumen\ Public\ License
Nethack\ License
Nokia\ Open\ Source\ License
Non-Profit\ Open\ Software\ License\ 3.0
NTP\ License
OCLC\ Research\ Public\ License\ 2.0
Open\ Font\ License\ 1.1
Open\ Group\ Test\ Suite\ License
Open\ Software\ License\ 3.0
PHP\ License
Python
Python\ Software\ Foundation\ License
QPL
RealNetworks\ Public\ Source\ License\ 1.0
Reciprocal\ Public\ License\ 1.5
Ricoh\ Source\ Code\ Public\ License
Simple\ Public\ License\ 2.0
Sleepycat\ License
Sun\ Public\ License
Sybase\ Open\ Watcom\ Public\ License\ 1.0
University\ of\ Illinois/NCSA\ Open\ Source\ License
Vovida\ Software\ License\ 1.0
W3C\ License
wxWindows\ Library\ License
X.Net\ License
zlib/libpng
Zope\ Public\ License
OSI\ Approved
no\ OSI\ Approved
)
#------------------------------------------------------------------------------
# APSE arrays
apse_site_name[0]="http://fileforum.betanews.com"
apse_uri[0]="http://fileforum.betanews.com/search?search_advanced=Search+FileForum&os%5B%5D=12&alphabeta=R&title="
apse_put_fields[0]=""
apse_error_msg[0]="No results found\. Please try another search\."
apse_grep[0]=""
apse_sed[0]="s,.*<span>1.</span> <a href=[^ ]*>\${search_name}[^<]*[ ]\([^ <]*\)</a></h1>.*,\1,pi"
apse_site_name[1]="http://linux.softpedia.com"
apse_uri[1]="http://linux.softpedia.com/progSearch"
apse_put_fields[1]="src="
apse_error_msg[1]="No results found"
apse_grep[1]="<b[^<]*\${search_name}[^a-zA-Z]"
apse_sed[1]="s,.*<b[^<]*\${search_name}[^<]*[ ]\([^ <]*\)</b>.*,\1,pi"
apse_site_name[2]="http://www.gnomefiles.org"
apse_uri[2]="http://www.gnomefiles.org/app.php/"
apse_put_fields[2]=""
apse_error_msg[2]="We are currently making some improvements"
apse_grep[2]=""
apse_sed[2]="s,.*<B>version \([^ <]*\)</b>.*,\1,pi"
apse_site_name[3]="http://freshmeat.net"
apse_uri[3]="http://freshmeat.net/projects/"
apse_put_fields[3]=""
apse_error_msg[3]="We encountered an error"
apse_grep[3]="/releases/"
apse_sed[3]="s,.*<a href=\"\/releases\/[0-9]*\/\">\([^ <]*\)</a>.*,\1,pi"
apse_site_name[4]="http://sourcewell.berlios.de"
apse_uri[4]="http://sourcewell.berlios.de/appsearch.php?by=Importance&search="
apse_put_fields[4]=""
apse_error_msg[4]="No Application found"
apse_grep[4]="appbyid.*\${search_name}[^a-zA-Z].*Stable"
apse_sed[4]="s,.*<a href=\"appbyid.*\">\${search_name} \([^ <]*\)</a>.*,\1,pi"
apse_site_name[5]="http://distrowatch.com"
apse_uri[5]="http://distrowatch.com/packages.php?"
apse_put_fields[5]=""
apse_error_msg[5]="is currently being redesigned"
apse_grep[5]="td.*/\${search_name}[-_][0-9]"
apse_sed[5]="s,.*td><[^>]*>\([^ <]*\)<.*,\1,pi"
#------------------------------------------------------------------------------
# mode to be used when creating and updating the specfiles
rpm_specfile_mode="644"
# macro used to automatically build debug packages
rpm_macro_debug_package="%debug_package"
rpm_macro_debug_package_suffix="debug"
rpm_default_buildroot="%{_tmppath}/%{name}-%{version}-root"
# Set these variables to modify the autoformatting behaviour
# - width of the `%description blocks'
# (default: 0 (unlimited line length); was `80')
format_description_width=0
# - tab size for the entries in the specfile preamble (default: 14)
format_preamble_tab=14
# format_buildroot, format_builddir: leave blank to disable any substitutions
format_buildroot="%{buildroot}"
format_builddir="%{_builddir}"
# Use the rpm variable names for common Unix tools (default is: 0)
# i.e. %{_make}, %{__rm}, %{__ln_s}, %{__mkdir_p}, ...
format_unix_tools=0
# Extra-formatting rules (distro-specific)
format_extra_rules="\
s,\(%{_mandir}/.*man[0-9]/.*\.\)[0-8]$man_compress_ext.*,\1\*,
s,\(/usr/share/man/.*man[0-9]/.*\.\)[0-8]$man_compress_ext.*,\1\*,
s,\(%{_infodir}/.*\.\)info$man_compress_ext.*,\1\*,
s,\(/usr/share/info/.*\.\)info$man_compress_ext.*,\1\*,
s,\$RPM_BUILD_ROOT,%{buildroot},g
s,%perl_major_ver,%{perl_major_ver},g
s,%buildroot,%{buildroot},g;s,#%{buildroot}},#%buildroot},g
s,\&\& rm -rf %{buildroot},\&\& rm -rf \"%{buildroot}\",
s,test x\"%{buildroot}\" != x/,[ \"%{buildroot}\" != / ],
s,[\[]* [\"]*%{buildroot}[\"]* []]* && rm -.*,\
[ \"%{buildroot}\" != / ] \&\& rm -rf \"%{buildroot}\",
s,echo \"%doc \(\${dir#%.*\),echo \"%dir \1,
s,make[ \t]*%[{]*[?]*_smp_mflags[}]*,%make,
s,^[ \t]*\([%]*make\)[ \t]*pure_install[ \t]*$,%makeinstall_perl,
s,^perl Makefile.PL$,perl Makefile.PL PREFIX=%{_prefix} INSTALLDIRS=vendor,
s,\[\[ -z \"\$packlist\" \]\],\[ -z \"\$packlist\" \],"
# The standard values for the `BuildRoot' id
format_buildroot_value="%{_tmppath}/%{name}-%{version}-root"
# Enable autoformatting (disabled by default)
format_autoformat=0
# Set this variable to modify the rpm unpackaged file list conversion
format_unpackaged_file_list="\
s,^/usr/bin,%{_bindir},
s,^/usr/sbin,%{_sbindir},
s,^/usr/libexec,%{_libexecdir},
s,^/usr/lib,%{_libdir},
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},"
# set this variable to '1' if rpm ignores the BuildRoot tag of a specfile
rpm_ignores_buildroot=1
#------------------------------------------------------------------------------
# Name of the PERL script used to generate the Makefile in perl packages
# (default is "Makefile.PL", but at least one package uses "BUILD.PL")
perl_Makefile_generator="Makefile.PL"
# Default License for perl packages
# (default is "", but can be normally set to "Artistic")
perl_License_default=""
#------------------------------------------------------------------------------
# Number of old SPEC files to keep as backup copies (history of modifications)
spec_backup_numbers=5
# Filename extension appended to backup copies ('old' by default)
spec_backup_extension="old"
# Create "hidden" (default) or "visible" backup copies
spec_backup_attr="hidden"
# Output with ascii colors (enabled by default)
# Default colors are:
# CRIT="${ESC}[1;31m" (red)
# NOTE="${ESC}[1;33m" (yellow)
# WARN="${ESC}[1;31m"
# EXIT="${ESC}[1;31m"
colorize=1
# Logging directory (default is /var/tmp/@package@)
logging_dir="/var/tmp/@package@"
#------------------------------------------------------------------------------
# List of plugins
plugindir=@plugindir@
plugin_pck_update="$plugindir/pck-update"
plugin_spec_create="$plugindir/spec-create"
plugin_pck_extract="$plugindir/pck-extract"
plugin_config_getvar="$plugindir/config-getvar"
# List of templates
templatedir="@templatedir@"
# List of tests
testdir="@testdir@"
#------------------------------------------------------------------------------
# Directories used by the rpm tool to read and save files to
srpms_dir="`rpm --eval %_srcrpmdir 2>/dev/null`"
rpms_dir="`rpm --eval %_rpmdir 2>/dev/null`"
spec_dir="`rpm --eval %_specdir 2>/dev/null`"
source_dir="`rpm --eval %_sourcedir 2>/dev/null`"
build_dir="`rpm --eval %_builddir 2>/dev/null`"
tmppath_dir="`rpm --eval %_tmppath 2>/dev/null`"

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() {
@ -62,9 +62,12 @@ function autospec.usage() {
-h, --help "$"Print this help, then exit""
-V, --version "$"Print version number, then exit""
-q, --quiet "$"Run in quiet mode""
-r, --colorize "$"Enable the colorized output""
-D, --debug "$"Run in debugging mode (very verbose output)""
"$"Common options"":
--colors "$"Select the theme to be used for the colorized output""
-C, --config "$"Use an alternate user configuration file""
"$"Usage"":
"$"Use '-u -h', '-s -h', '-x -h', and '--eval -h' to display specific command line options.""
@ -92,8 +95,32 @@ notify.disable_colors
. @libdir@/libcfg.lib
for arg in $@; do
case $arg in
# 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.
# see. /usr/sbin/mkinitrd (dracut-024)
function read_arg() {
# $1 = arg name
# $2 = arg value
# $3 = arg parameter
local rematch='^[^=]*=(.*)$'
if [[ $2 =~ $rematch ]]; then
read "$1" <<< "${BASH_REMATCH[1]}"
elif [[ $3 != -* ]]; then
# Only read next arg if it not an arg itself.
read "$1" <<< "$3"
# There is no way to shift our callers args, so
# return 1 to indicate they should do it instead.
return 1
fi
}
args=()
cmdline_vars=()
while (($# > 0)); do
args[${#args[*]}]="$1"
case ${1%%=*} in
-u|--update)
let "pck_update = 1" ;;
-s|--source)
@ -106,16 +133,40 @@ for arg in $@; do
let "verbose = 2" ;;
-q|--quiet)
let "verbose = 0" ;;
-r|--colorize)
let "colorize = 1" ;;
-h|--help)
let "print_help = 1" ;;
-V|--version)
let "print_version = 1" ;;
*) ;;
--colors)
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 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]}]"
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"
case "$(( $pck_update + $spec_create + $pck_extract + $config_getvar ))" in
0) [ "$print_help" = "1" ] && autospec.usage 0
if [ "$print_version" = "1" ]; then
@ -130,11 +181,6 @@ case "$(( $pck_update + $spec_create + $pck_extract + $config_getvar ))" in
*) autospec.usage 1 ;;
esac
[ "$logging" = "1" ] && let "colorize = 0"
[ "$colorize" = "1" ] && notify.enable_colors
notify.debug "[${me[0]}, "$"version"" ${me[1]}]"
# checking for errors in the configuration file
[ "$config_getvar" = 1 ] || config.integrity
@ -157,14 +203,17 @@ notify.debug "tmpargfile = \`${NOTE}$tmpargfile${NORM}'"
# workaround to bypass the issues related to bash expansion in multi-word
# strings (ex: autospec -u s.spec -a4 1.0 --changelog "here's the problem")
echo -n "set -- " > $tmpargfile
while [ $# -gt 0 ]; do
echo -n "\"$1\" " >> $tmpargfile
shift
for i in `seq 1 1 ${#args[@]}`; do
echo -n "\"${args[$i-1]}\" " >> $tmpargfile
done
echo >> $tmpargfile
notify.debug "\
running: \`$plugin_to_run --autospec-args-file=$tmpargfile'"
notify.debug "[$tmpargfile]"
notify.debug "$(cat $tmpargfile)"
$plugin_to_run --autospec-args-file=$tmpargfile
exit $?

View File

@ -1,6 +1,6 @@
# please customize this directive (or use root if your distro does not have
# such a group)
%define packager_group packager
# modify these definitions according to your distribution
%define distribution openmamba
%define vendor openmamba
Name: autospec
Version: @version@
@ -8,22 +8,25 @@ Release: @release@
Summary: Create specfiles and automatically update/check/fix rpm packages
Summary(it): Crea specfile ed aggiorna/controlla/corregge in modo automatico pacchetti rpm
Group: Development/Tools
Vendor: openmamba
Distribution: openmamba
Vendor: %{vendor}
Distribution: %{distribution}
Packager: Davide Madrisan <davide.madrisan@gmail.com>
URL: http://www.openmamba.org/packages.html
URL: https://sites.google.com/site/davidemadrisan/opensource#TOC-autospec-suite
# http://git.openmamba.org/?p=autospec.git;a=summary
Source: autospec-%{version}.tar.bz2
Requires(pre): bash
Requires(pre): make
Requires(pre): rpm
Requires: cpio, coreutils, curl, findutils, grep, sed
Requires: /bin/mktemp
Requires: /usr/bin/getopt
Requires: /usr/bin/host
Requires: bzip2
Requires: gzip
Requires: unzip
#Requires: sudo
Requires: ftp
Requires: %{name}-plugins = %{?epoch:%epoch:}%{version}-%{release}
BuildRequires: gettext
License: GPL
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-root
@ -40,7 +43,9 @@ Installa autospec se sei un packager o se vuoi creare/aggiornare pacchetti rpm i
Summary: Autospec plugins
Summary(it): Plugin di autospec
Group: Development/Tools
Requires: %{name}-config-%{distribution} = %{?epoch:%epoch:}%{version}-%{release}
Requires: %{name}-libs = %{?epoch:%epoch:}%{version}-%{release}
Requires: %{name}-templates-%{distribution} = %{?epoch:%epoch:}%{version}-%{release}
Requires: %{name}-tests = %{?epoch:%epoch:}%{version}-%{release}
Requires(pre): rpm
@ -50,6 +55,18 @@ This package contains the plugins needed for generating specfiles, updating rpm
%description -l it plugins
Questo pacchetto contiene i plugin necessari per generare specfile, aggiornare pacchetti rpm, estrarre file da pacchetti source rpm (srpm).
%package config-%{distribution}
Summary: Configuration files for autospec
Summary(it): File di configurazione per autospec
Group: Development/Tools
Provides: %{name}-config = %{?epoch:%epoch:}%{version}-%{release}
%description config-%{distribution}
This package contains the configuration files for autospec.
%description -l it config-%{distribution}
Questo pacchetto contiene i file di configurazione di autospec.
%package libs
Summary: Autospec libraries
Summary(it): Librerie di autospec
@ -63,6 +80,18 @@ They can be used by external tools that manage rpm packages and specfiles.
Questo pacchetto contiene le librerie necessarie al funzionamento di autospec e dei suoi plugin.
Possono anche essere stilizzate da tool esterni che lavorano su rpm e specfile.
%package templates-%{distribution}
Summary: Autospec templates
Summary(it): Template per autospec
Group: Development/Tools
Provides: %{name}-templates = %{?epoch:%epoch:}%{version}-%{release}
%description templates-%{distribution}
This package contains the templates used by autospec for generating specfiles from tarballs.
%description -l it templates-%{distribution}
Questo pacchetto contiene i template utilizzati da autospec per generare gli specfile a partire dai sorgenti.
%package tests
Summary: Autospec tests
Summary(it): Test per autospec
@ -103,10 +132,9 @@ make install DESTDIR=%{buildroot} prefix=%{_prefix}
%files
%defattr(-,root,root)
%{_bindir}/%{name}
%lang(it) %{_mandir}/it/man1/autospec.*
%lang(it) %{?_localedir:%{_localedir}}%{!?_localedir:%_datadir/locale}/it/LC_MESSAGES/autospec_fe.mo
%lang(it) %{_mandir}/it/man1/%{name}.*
%lang(it) %{?_localedir:%{_localedir}}%{!?_localedir:%_datadir/locale}/it/LC_MESSAGES/%{name}.mo
%doc AUTHORS BUGS ChangeLog COPYING NEWS TODO
%doc autospec-it-HOWTO
%files plugins
%defattr(-,root,root)
@ -114,26 +142,25 @@ make install DESTDIR=%{buildroot} prefix=%{_prefix}
%{_bindir}/pck-extract
%{_bindir}/pck-update
%{_bindir}/spec-create
%if %{packager_group} == "root"
%config %attr(644,root,root) %{_sysconfdir}/%{name}.conf
%else
%config %attr(640,root,%{packager_group}) %{_sysconfdir}/%{name}.conf
%endif
%{_datadir}/%{name}/templates/*
%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
%files config-%{distribution}
%defattr(-,root,root)
%dir %{_sysconfdir}/%{name}.d
%config %attr(644,root,root) %{_sysconfdir}/%{name}.d/*.conf
%config %attr(644,root,root) %{_sysconfdir}/%{name}.d/color-theme.*
%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)
%{_datadir}/%{name}/templates
%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)
@ -144,6 +171,83 @@ 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
* Fri Nov 09 2012 Davide Madrisan <davide.madrisan@gmail.com> 1.14.1-1mamba
- update to 1.14.1 (_TO*Hacklab release)
* Thu Nov 01 2012 Davide Madrisan <davide.madrisan@gmail.com> 1.14.0-1mamba
- update to 1.14.0
* Wed Oct 03 2012 Davide Madrisan <davide.madrisan@gmail.com> 1.12.5-1mamba
- update to 1.12.5
* Sat Sep 22 2012 Davide Madrisan <davide.madrisan@gmail.com> 1.12.4-1mamba
- update to 1.12.4
* Tue Jul 17 2012 Davide Madrisan <davide.madrisan@gmail.com> 1.12.3-1mamba
- update to 1.12.3
* Mon May 28 2012 Davide Madrisan <davide.madrisan@gmail.com> 1.12.2-1mamba
- update to 1.12.2
* Wed May 23 2012 Davide Madrisan <davide.madrisan@gmail.com> 1.12.1-1mamba
- update to 1.12.1
* Sun May 20 2012 Davide Madrisan <davide.madrisan@gmail.com> 1.12.0-1mamba
- update to 1.12.0
- new subpackages %{name}-config-openmamba and %{name}-templates-openmamba
- require bash
* Mon May 01 2012 Davide Madrisan <davide.madrisan@gmail.com> 1.10.0-1mamba
- update to 1.10.0
* Wed Apr 18 2012 Davide Madrisan <davide.madrisan@gmail.com> 1.9.4-1mamba
- update to 1.9.4
* Sun Apr 01 2012 Davide Madrisan <davide.madrisan@gmail.com> 1.9.3-1mamba
- update to 1.9.3
* Sun Feb 05 2012 Davide Madrisan <davide.madrisan@gmail.com> 1.9.2-1mamba
- update to 1.9.2

10
conf/00-distribution.conf Normal file
View File

@ -0,0 +1,10 @@
## Linux distribution ---------------------------------------------------------
# distribution name (i.e. "openmamba")
DISTRO="openmamba"
# rpm distribution id (i.e. "mamba" --> pck-1.0-1mamba.i586.rpm)
DISTRO_rpm="mamba"
# vendor (i.e. "openmamba")
VENDOR="openmamba"

73
conf/01-repositories.conf Normal file
View File

@ -0,0 +1,73 @@
## Repositories ---------------------------------------------------------------
# SECURITY WARNING: if `ftp_rw_user[*]' and `ftp_rw_passwd[*]' are set,
# this file should be only readable by the `$packager_group' group, if any
# Aliases for server numbers (repositories)
ftp_alias[0]=""
ftp_alias[1]="contrib"
# Enable/Disable switch for repositories (enable by default when unset)
ftp_enable[0]=1
ftp_enable[1]=1
# 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.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.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)
# - ftp_rw_passive_mode : passive mode (can be "on" or "off" (the default))
# - ftp_rw_rpms_dir : ftp path where RPMS packages will be uploaded
# (i.e. "/RPMS", "/devel-contrib/RPMS")
# - ftp_rw_srpms_dir : ftp path where SRPMS packages will be uploaded
# (i.e. "/SRPMS", "/devel-contrib/RPMS")
#
# WARNING: the entries MUST respect the order used in `ftpurl_ro_rpms'
ftp_rw_server[0]=
ftp_rw_port[0]=
ftp_rw_passive_mode[0]=
ftp_rw_user[0]=
ftp_rw_passwd[0]=
ftp_rw_rpms_dir[0]=
ftp_rw_srpms_dir[0]=
ftp_rw_server[1]="ftp://ftpaccounts.openmamba.org"
ftp_rw_port[1]=
ftp_rw_passive_mode[1]=on
ftp_rw_user[1]="devel-contrib"
ftp_rw_passwd[1]="<hidden>"
ftp_rw_rpms_dir[1]="/RPMS.@arch@"
ftp_rw_srpms_dir[1]="/SRPMS.base"
# if no old version of the packages are found in the repositories
# `ftpurl_ro_srpms', use this one as default repository
# (its value is the index of `ftp_rw_server', default: `1')
ftp_rw_server_num_default=1
# FTP directories where old packages will be moved for backup
# (i.e. "/devel/old", "")
# IMPORTANT: SAME SIZE and ORDER as `ftp_rw_rpms_dir[]'
ftpdir_rw_old[0]=""
ftpdir_rw_old[1]=""
# list of all supported architectures (note: 'noarch' is *not* a valid arch)
arch_list[0]="i586 arm x86_64 aarch64"
arch_list[1]="i586"
# where to upload noarch packages
# (should be "noarch" to upload them only to the noarch subtree, or
# "${arch_list[n]}" to upload them to all the architecture subtrees
# defined for the branch <n>
arch_noarch_upload[0]="${arch_list[0]}"
arch_noarch_upload[1]="${arch_list[1]}"

View File

@ -0,0 +1,179 @@
## rpm approved licenses ------------------------------------------------------
rpm_approved_licenses=(
Academic\ Free\ License\ 3.0
Adaptive\ Public\ License
Affero\ GNU\ Public\ License
Apache\ License
Apache\ License\ 2.0
Apple\ Public\ Source\ License
Artistic
Attribution\ Assurance\ Licenses
Boost\ Software\ License
BSD
Common\ Development\ and\ Distribution\ License
Common\ Public\ Attribution\ License\ 1.0
Computer\ Associates\ Trusted\ Open\ Source\ License\ 1.1
Copyright\ only
CUA\ Office\ Public\ License\ 1.0
Eclipse\ Public\ License
Educational\ Community\ License
Eiffel\ Forum\ License\ 2.0
Entessa\ Public\ License
EU\ Datagrid\ Software\ License
European\ Union\ Public\ License
Fair\ License
Frameworx\ License
GPL
Historical\ Permission\ Notice\ and\ Disclaimer
IBM\ Public\ License
IEEE
IPA\ Font\ License
ISC\ License
LGPL
Lucent\ Public\ License\ 1.02
Microsoft\ Public\ License
Microsoft\ Reciprocal\ License
MirOS Licence
MIT
Motosoto\ License
MPL\ 1.1
NASA\ Open\ Source\ Agreement\ 1.3
Naumen\ Public\ License
Nethack\ License
Nokia\ Open\ Source\ License
Non-Profit\ Open\ Software\ License\ 3.0
NTP\ License
OCLC\ Research\ Public\ License\ 2.0
Open\ Font\ License\ 1.1
Open\ Group\ Test\ Suite\ License
Open\ Software\ License\ 3.0
PHP\ License
Python
Python\ Software\ Foundation\ License
QPL
RealNetworks\ Public\ Source\ License\ 1.0
Reciprocal\ Public\ License\ 1.5
Ricoh\ Source\ Code\ Public\ License
Simple\ Public\ License\ 2.0
Sleepycat\ License
Sun\ Public\ License
Sybase\ Open\ Watcom\ Public\ License\ 1.0
University\ of\ Illinois/NCSA\ Open\ Source\ License
Vovida\ Software\ License\ 1.0
W3C\ License
wxWindows\ Library\ License
X.Net\ License
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

@ -0,0 +1,38 @@
# Specfile autoformatting variables and rules ---------------------------------
# Set these variables to modify the autoformatting behaviour
# - width of the `%description blocks'
# (default: 0 (unlimited line length); was `80')
format_description_width=0
# - tab size for the entries in the specfile preamble (default: 14)
format_preamble_tab=14
# format_buildroot, format_builddir: leave blank to disable any substitutions
format_buildroot="%{buildroot}"
format_builddir="%{_builddir}"
# Use the rpm variable names for common Unix tools (default is: 0)
# i.e. %{_make}, %{__rm}, %{__ln_s}, %{__mkdir_p}, ...
format_unix_tools=0
# Extra-formatting rules (distro-specific)
format_extra_rules="\
s,\(%{_mandir}/.*man[0-9]/.*\.\)[0-8]$man_compress_ext.*,\1\*,
s,\(/usr/share/man/.*man[0-9]/.*\.\)[0-8]$man_compress_ext.*,\1\*,
s,\(%{_infodir}/.*\.\)info$man_compress_ext.*,\1\*,
s,\(/usr/share/info/.*\.\)info$man_compress_ext.*,\1\*,
s,\$RPM_BUILD_ROOT,%{buildroot},g
s,%perl_major_ver,%{perl_major_ver},g
s,%buildroot,%{buildroot},g;s,#%{buildroot}},#%buildroot},g
s,\&\& rm -rf %{buildroot},\&\& rm -rf \"%{buildroot}\",
s,test x\"%{buildroot}\" != x/,[ \"%{buildroot}\" != / ],
s,[\[]* [\"]*%{buildroot}[\"]* []]* && rm -.*,\
[ \"%{buildroot}\" != / ] \&\& rm -rf \"%{buildroot}\",
s,echo \"%doc \(\${dir#%.*\),echo \"%dir \1,
s,make[ \t]*%[{]*[?]*_smp_mflags[}]*,%make,
s,^[ \t]*\([%]*make\)[ \t]*pure_install[ \t]*$,%makeinstall_perl,
s,^perl Makefile.PL$,perl Makefile.PL PREFIX=%{_prefix} INSTALLDIRS=vendor,
s,\[\[ -z \"\$packlist\" \]\],\[ -z \"\$packlist\" \],"
# The standard values for the `BuildRoot' id
format_buildroot_value="%{_tmppath}/%{name}-%{version}-root"
# Enable autoformatting (disabled by default)
format_autoformat=0

View File

@ -0,0 +1,19 @@
## Default values for some rpm tags and descriptions --------------------------
# - default value for `Summary id'
summary_defvalue="... package summary"
# - default value for `Group id'
group_defvalue="... package group"
# - default value for `URL id'
url_defvalue="... package URL"
# - default value for `License id'
license_defvalue="... package license"
# - default value for `%description'
description_defval="... package description"
# - default value for `%description devel'
description_devel_defval="... devel package description"
# - default value for `%changelog'
changelog_samever_defvalue="... add a changelog entry"
# - default value for `%changelog' when updating a package to the same version
changelog_rebuild_defvalue="rebuilt"
changelog_userdef=""

View File

@ -0,0 +1,19 @@
## Force a name structure for some specific packages --------------------------
# Force a name structure for library packages
# Default value: "" (no structure)
# An alternative setting can be "^lib" if your libraries must start with lib
library_name_structure=""
# Structure for the names of the patches (Patch[0-9]* ids)
# Default value: "^%\{name\}-[0-9][\.0-9a-z]*-[a-zA-Z0-9_-]+*.patch[\.gzb2]*",
# that is '%{name}-pck_version_when_first_applied-short_description.patch'
# If you don't want to fix a structure use ""
patch_name_structure="^%\{name\}-[0-9][\.0-9a-z]*-[a-zA-Z0-9_-]+*.patch[\.gzb2]*"
# Structure for the 'Source'/'Source0' id
# 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="\(https\|http\|ftp\|git\):\/\/.*\.\(tar\.gz\|tgz\|tar\.bz2\|tar\.Z\|tar\.xz\|shar\.gz\|zip\)"

View File

@ -0,0 +1,15 @@
## Settings for manpages/infopages --------------------------------------------
# File extensions for compressed man/info pages (`/usr/lib/rpm/brp-compress')
man_compress_ext=".gz"
info_compress_ext=$man_compress_ext
# Set to modify the way man pages in the autogenerated specfile are written
# "0" : all the entries (this is the default)
# "1" : one entry for each man page section
# "2" : only one entry for all the man pages
man_condensed_list=0
# Set to modify the way info pages in the autogenerated specfile are written
# "0" : all the entries (this is the default)
# "2" : only one entry for all the info pages
info_condensed_list=0

View File

@ -0,0 +1,100 @@
## Distribution specfile packaage groups --------------------------------------
library_group="System/Libraries"
library_summary="Static libraries and headers for %{name}"
library_group_devel="Development/Libraries"
library_group_perl="System/Libraries/Perl"
python_modules_group="System/Libraries/Python"
## List of allowed rpm groups -------------------------------------------------
rpm_allowed_groups=(
Applications/Accessibility
Applications/Archiving
Applications/Communication
Applications/Databases
Applications/Development
Applications/Educational
Applications/Emulators
Applications/File
Applications/Fonts
Applications/Games
Applications/Graphics
Applications/Mathematics
Applications/Multimedia
Applications/Networking
Applications/Publishing
Applications/Scientific
Applications/Security
Applications/Shells
Applications/Spelling\ Checker
Applications/Text
Applications/Web
Development/Applications
Development/Bindings
Development/Debug
Development/Kernel
Development/Languages
Development/Libraries
Development/Libraries/Java
Development/Libraries/OCaml
Development/Libraries/Perl
Development/Libraries/Python
Development/Tools
Documentation
Graphical\ Desktop/Applications/Accessibility
Graphical\ Desktop/Applications/Administration
Graphical\ Desktop/Applications/Archiving
Graphical\ Desktop/Applications/Configuration
Graphical\ Desktop/Applications/Databases
Graphical\ Desktop/Applications/Development
Graphical\ Desktop/Applications/Educational
Graphical\ Desktop/Applications/Environment
Graphical\ Desktop/Applications/Games
Graphical\ Desktop/Applications/Graphics
Graphical\ Desktop/Applications/Internet
Graphical\ Desktop/Applications/Multimedia
Graphical\ Desktop/Applications/Networking
Graphical\ Desktop/Applications/Office
Graphical\ Desktop/Applications/Other
Graphical\ Desktop/Applications/Publishing
Graphical\ Desktop/Applications/Scientific
Graphical\ Desktop/Applications/Security
Graphical\ Desktop/Applications/Utilities
Graphical\ Desktop/Fonts
Graphical\ Desktop/Libraries/GNOME
Graphical\ Desktop/Libraries/QT
Graphical\ Desktop/Libraries/KDE
Graphical\ Desktop/Look\ \'n\'\ feel
Graphical\ Desktop/Look\ \'n\'\ feel/Themes
Graphical\ Desktop/Look\ \'n\'\ feel/Screensavers
Installation/Update
Network/File\ Transfer
Network/File\ Systems
Network/High Availability
Network/Libraries
Network/Monitoring
Network/Routing
Network/Security
System/Benchmarks
System/Clustering
System/Configuration
System/Database
System/Kernel\ and\ Hardware
System/Kernel\ and\ Hardware/Drivers
System/Fonts
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
System/Spooling
System/Telephony
System/Tools
System/X11)

View File

@ -0,0 +1,2 @@
## macros used to automatically build debug packages --------------------------
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

@ -0,0 +1,13 @@
## Macros for PERL packages ---------------------------------------------------
# Name of the PERL script used to generate the Makefile in perl packages
# (default is "Makefile.PL", but at least one package uses "BUILD.PL")
perl_Makefile_generator="Makefile.PL"
# Default License for perl packages
# (default is "", but can be normally set to "Artistic")
perl_License_default=""
# Force a name structure for PERL packages
# Set to "" if you don't want to fix a structure
perl_module_name_structure="^perl-"

View File

@ -0,0 +1,13 @@
## Macros for python packages -------------------------------------------------
# rpm_macro_pyver: python version number
rpm_macro_pyver="%python_version"
# Paths used in the autogenerated specfiles
#python_install_lib_path="%{_libdir}/site-python"
python_install_lib_path="%{python_sitearch}"
# Force a name structure for Python packages
# Set to "" if you don't want to fix a structure
#python_module_name_structure="^python-"
python_module_name_structure=""

View File

@ -0,0 +1,32 @@
## rpm macros -----------------------------------------------------------------
# rpm macros for common packaging actions
rpm_macro_configure="%configure"
rpm_macro_makeinstall="%makeinstall"
# NOTE: the `make' and `makeoldinstall' are not standard rpm macros
# if are unsupported in the rpm tool you're using, you may use these settings:
# - rpm_macro_make=""
# - rpm_macro_makeoldinstall="%makeinstall"
rpm_macro_make="%make"
rpm_macro_makeoldinstall="%makeoldinstall"
# A (non standard) macro for perl modules (unset if not used)
rpm_macro_makeinstall_perl="%makeinstall_perl"
# rpm macros used to install and remove info pages
rpm_macro_installinfo="%install_info"
rpm_macro_uninstallinfo="%uninstall_info"
rpm_macro_installinfo_binary="%{__install_info}"
# rpm macros for cmake
# Default value: "%cmake -d build" (out-of-source builds)
# NOTE (in-source builds)
# rpm_macro_cmake="%cmake"
# rpm_macro_makeinstall_cmake="%makeinstall"
rpm_macro_cmake="%cmake -d build"
rpm_macro_makeinstall_cmake="%makeinstall -C build"
# buildroot macro
rpm_default_buildroot="%{_tmppath}/%{name}-%{version}-root"
# set this variable to '1' if rpm ignores the BuildRoot tag of a specfile
rpm_ignores_buildroot=1

77
conf/03-apse.conf Normal file
View File

@ -0,0 +1,77 @@
## APSE (Autospec Package Search Engine) arrays -------------------------------
apse_enabled[0]=1
apse_site_name[0]="source0"
apse_enabled[1]=0
apse_site_name[1]="https://sourceforge.net"
apse_enabled[2]=1
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[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[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[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[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[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[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[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

@ -0,0 +1,135 @@
## conversion rules for unpackaged files
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/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,^/var,%{_localstatedir},
"
## 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

@ -0,0 +1,49 @@
## External commands and options ----------------------------------------------
# Options used by curl while dowloading source files
# (default: "--connect-timeout 15 --retry 3")
# If you'd like your transfer not use your entire bandwidth you can use the
# `--limit-rate' option (for instance `--limit-rate 250k')
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"
# 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
# here an example (works for QiLinux and openmamba):
# Cmnd_Alias DISTRO_CMD = /usr/bin/apt-get, /bin/rpm
# %packager ALL = NOPASSWD: DISTRO_CMD
# (of course your user must belong to the `packager' group)
# Examples:
# apt : rpm_download_and_install="sudo apt-get --quiet --yes install"
# smart: 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='-apidocs-'
rpm_install_noinstall_mask='-apidocs-|-debug-'
# Mask that identify packages providing localization...
# - default value='-i18n-|-help-'
rpm_install_l10n_pck_mask='-i18n-|-help-|-langpack-|langpacks-'
# ...and only install localization packages matching this regular expression
# - 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'
srpm_install_options='--nodeps'
# Path of the some tools commonly used in the specfiles
path_ldconfig="/sbin/ldconfig"
path_installinfo="/sbin/install-info"

View File

@ -0,0 +1,2 @@
## Packager group -------------------------------------------------------------
packager_group="packager"

View File

@ -0,0 +1,4 @@
## Allowed paths for system libraries -----------------------------------------
allowed_libdirs="\
/lib:/usr/lib:/lib64:/usr/lib64"

52
conf/Makefile Normal file
View File

@ -0,0 +1,52 @@
# Makefile for autospec
# Copyright (C) 2012 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
# Free Software Foundation.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY, to the extent permitted by law; without even the implied
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along with
# this program; if not, write to the Free Software Foundation, Inc.,
# 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
srcdir = ..
include $(srcdir)/Makefile.env
pck_confs_infiles := $(wildcard *.conf.in)
pck_confs := \
$(wildcard *.conf) $(patsubst %.conf.in,%.conf,$(wildcard *.conf.in))
pck_color_themes := $(wildcard color-theme.*)
all:
check: $(pck_confs) $(pck_color_themes)
@for f in $(pck_confs) $(pck_color_themes); do\
echo -n "checking $$f... ";\
bash -n $$f \
&& echo "[PASSED]" || { echo "[FAILED]"; exit 1; };\
done
install: $(pck_confs) $(pck_color_themes)
@$(INSTALL_DIR) $(DESTDIR)$(confdir)
for f in $(pck_confs) $(pck_color_themes); do\
if [ $${f} = "autospec.conf" ]; then\
$(INSTALL_DATA) $${f} $(DESTDIR)$(sysconfdir)/$${f};\
else\
$(INSTALL_DATA) $${f} $(DESTDIR)$(confdir)/$${f};\
fi;\
done
uninstall:
for f in $(pck_confs); do\
rm -f $(DESTDIR)$(confdir)/$${f};\
done
clean:
rm -f $(patsubst %.in,%,$(pck_confs_infiles))

73
conf/autospec.conf.in Normal file
View File

@ -0,0 +1,73 @@
## Main configuration file for `@package@'
# *** DO NOT EDIT THIS FILE ***
# *** It will be overwritten at the next package update ***
#
# Create a user configuration file in your home directory instead
# (.autospec and .autopec.d/*,conf files, if you need them) like the following
# one (please customize all the values).
#
# proxy="proxyhost:8080"
# proxy_user="user:password"
# packager_fullname="Your Name"
# packager_email="email@domain"
# ftp_rw_user[1]="user"
# ftp_rw_passwd[1]="passwd"
# arch_list=(i686 ppc)
# rpm_download_and_install="sudo apt-get --quiet --yes install"
# rpm_install="sudo rpm -hUv"
# rpm_install_force="sudo rpm -hUv --force --nodeps"
# curl_opts_netlink="--connect-timeout 15 --retry 3 --limit-rate 250k"
## Packager full name and email address (used in the Changelog) ---------------
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"
## Rules for backupping specfiles ---------------------------------------------
# Number of old SPEC files to keep as backup copies (history of modifications)
spec_backup_numbers=5
# Filename extension appended to backup copies ('old' by default)
spec_backup_extension="old"
# Create "hidden" (default) or "visible" backup copies
spec_backup_attr="hidden"
## Output using ascii or web colors (enabled by default) ----------------------
# Default colors are:
# ESC=$(echo -en "\033")
# CRIT="${ESC}[1;31m" (red)
# NOTE="${ESC}[1;33m" (yellow)
# WARN="${ESC}[1;31m"
# EXIT="${ESC}[1;31m"
# NORM=$(echo -en "${ESC}[m\017")
# See the files: see /etc/@package@.d/color-theme.*
color_scheme="default"
## Logging directory (default is /var/tmp/@package@) --------------------------
logging_dir="/var/tmp/@package@"
## Autospec plugins -----------------------------------------------------------
plugindir=@plugindir@
plugin_pck_update="$plugindir/pck-update"
plugin_spec_create="$plugindir/spec-create"
plugin_pck_extract="$plugindir/pck-extract"
plugin_config_getvar="$plugindir/config-getvar"
## Autospec templates ---------------------------------------------------------
templatedir="@templatedir@"
## Test modules ---------------------------------------------------------------
testdir="@testdir@"
## Directories choosen by rpm for reading and saving files to -----------------
srpms_dir="`rpm --eval %_srcrpmdir 2>/dev/null`"
rpms_dir="`rpm --eval %_rpmdir 2>/dev/null`"
spec_dir="`rpm --eval %_specdir 2>/dev/null`"
source_dir="`rpm --eval %_sourcedir 2>/dev/null`"
build_dir="`rpm --eval %_builddir 2>/dev/null`"
tmppath_dir="`rpm --eval %_tmppath 2>/dev/null`"

9
conf/color-theme.default Normal file
View File

@ -0,0 +1,9 @@
#
# color scheme "terminal-dark"
#
ESC=$(echo -en "\033") # ascii ESCape
CRIT="${ESC}[1;31m" # switch on red
NOTE="${ESC}[1;33m" # switch on yellow
WARN="${ESC}[1;31m"
EXIT="${ESC}[1;31m"
NORM=$(echo -en "${ESC}[m\017")

4
conf/color-theme.none Normal file
View File

@ -0,0 +1,4 @@
#
# color scheme "none" (disable colors)
#
ESC= CRIT= NOTE= WARN= EXIT= NORM=

View File

@ -0,0 +1,9 @@
#
# color scheme "terminal-dark"
#
ESC=$(echo -en "\033") # ascii ESCape
CRIT="${ESC}[1;31m" # switch on red
NOTE="${ESC}[1;33m" # switch on yellow
WARN="${ESC}[1;31m"
EXIT="${ESC}[1;31m"
NORM=$(echo -en "${ESC}[m\017")

View File

@ -0,0 +1,9 @@
#
# color scheme "terminal-white"
#
ESC=$(echo -en "\033") # ascii ESCape
CRIT="${ESC}[1;31m" # switch on red
NOTE="${ESC}[1;34m" # switch on blu
WARN="${ESC}[1;31m"
EXIT="${ESC}[1;31m"
NORM=$(echo -en "${ESC}[m\017")

9
conf/color-theme.web Normal file
View File

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

View File

@ -1,5 +1,5 @@
# Makefile for autospec
# Copyright (C) 2008,2010 by Davide Madrisan <davide.madrisan@gmail.com>
# Copyright (C) 2008,2010,2012 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,8 +18,10 @@ srcdir = ..
include $(srcdir)/Makefile.env
pck_libs := libapse.lib libcfg.lib libmsgmng.lib libnetwork.lib libspec.lib README.API
pck_libs := libapse.lib libcfg.lib libmsgmng.lib libnetwork.lib libspec.lib \
libtest.lib libtranslate.lib
pck_libs_infiles := $(wildcard *.in)
pck_libs_all := $(pck_libs) README.API
all:
@ -30,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 Stefano Cotta Ramusino <stefano.cotta@openmamba.org>
# Copyright (C) 2008-2011 Silvan Calarco <silvan.calarco@mambasoft.it>
# Copyright (C) 2007,2012 Stefano Cotta Ramusino <stefano.cotta@openmamba.org>
# 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
@ -47,14 +54,15 @@ function apse.cmpversion() {
version1 version2 minfield maxfield field1 field2 \
retval code1 code2 subarra1 position
let "position = 7"
let "position = 8"
vcs=(\
"cvs" "svn" "git" "rcs" "bzr" "mtn" "ae")
prealpha=(\
"prealpha" "nightlybuild" "development" "dev" ${vcs[*]})
beta=(\
"beta" "preview" "pre" "prototype" "proto" "tp" "ctp" "ea" "test" "milestone")
"beta" "preview" "pre" "prototype" "proto" "tp" "ctp" "ea" "test" \
"milestone")
rc=(\
"rc" "gm" "gamma")
stable=(\
@ -62,16 +70,17 @@ function apse.cmpversion() {
precedence=(\
"prealpha[*]" "alpha" "beta[*]" "rc[*]" "delta" "omega" "stable[*]")
# TODO: if there isn't in this list compare alphabetically
# TODO: if in both there is vcs compare, if only in one of them watch
# changelog or/and data
# TODO: if in both there is vcs compare, if only in one of them watch changelog or/and data
version1=($(echo $1 | tr '[:punct:]' ' ' | \
sed -e "s,\([a-zA-Z^ ]*\)\([0-9^ ]*\)\([a-zA-Z^ ]*\),\1 \2 \3,g"))
version1=(\
$(echo $1 | tr '[:punct:]' ' ' | \
sed -e "s,\([a-zA-Z^ ]*\)\([0-9^ ]*\)\([a-zA-Z^ ]*\),\1 \2 \3,g"))
notify.debug "$FUNCNAME: version1 = ${version1[*]}"
version2=($(echo $2 | tr '[:punct:]' ' ' | \
sed -e "s,\([a-zA-Z^ ]*\)\([0-9^ ]*\)\([a-zA-Z^ ]*\),\1 \2 \3,g"))
version2=(\
$(echo $2 | tr '[:punct:]' ' ' | \
sed -e "s,\([a-zA-Z^ ]*\)\([0-9^ ]*\)\([a-zA-Z^ ]*\),\1 \2 \3,g"))
notify.debug "$FUNCNAME: version2 = ${version2[*]}"
minfield=${#version1[*]}
@ -154,12 +163,20 @@ $FUNCNAME: \`$code2' has position ${version2[$i]} in precedence"
$FUNCNAME: \`$code1' has position ${version1[$i]} in precedence"
fi
if [[ ${version2[$i]} -gt ${version1[$i]} ]]; then
retval=2
break
elif [[ ${version2[$i]} -lt ${version1[$i]} ]]; then
retval=1
break
if [[ 10#${version2[$i]} -gt 10#${version1[$i]} ]]; then
retval=2
break
elif [[ 10#${version2[$i]} -lt 10#${version1[$i]} ]]; then
retval=1
break
elif [ "${version2[$i]}" = "8" ]; then
if [ "$code2" \> "$code1" ]; then
retval=2
elif [ "$code2" \< "$code1" ]; then
retval=1
else
retval=0
fi
else
if [ $i -eq $(($minfield-1)) ]; then
for j in $(seq $i 1 $[$maxfield-1]); do
@ -206,7 +223,8 @@ function apse.scrapeversion() {
function usage() {
echo "\
$me, "$"version"" @version@""
Copyright (C) 2007 Stefano Cotta Ramusino <stefano.cotta@openmamba.org>""
Copyright (C) 2007,2012 Stefano Cotta Ramusino <stefano.cotta@openmamba.org>""
Copyright (C) 2008-2011 Silvan Calarco <silvan.calarco@mambasoft.it>""
"$"Find for updates scanning the web.""
@ -220,6 +238,7 @@ Copyright (C) 2007 Stefano Cotta Ramusino <stefano.cotta@openmamba.org>""
-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""
@ -232,8 +251,9 @@ Copyright (C) 2007 Stefano Cotta Ramusino <stefano.cotta@openmamba.org>""
}
local ARGS
ARGS=`LC_ALL=C getopt -o han:s:w:p:u: \
--long help,allurl,pckname:,specname:,pckurl:,pckurlverbatim:,proxy:,proxy-user: \
ARGS=`LC_ALL=C getopt -o han:s:w:p:u:o: \
--long help,allurl,pckname:,specname:,pckurl:,pckurlverbatim:,\
proxy:,proxy-user:,autoupdate-off: \
-n "$FUNCNAME" -- "$@"`
[ $? = 0 ] || notify.error $"\
(bug)"" -- $FUNCNAME: "$"\`getopt' error"
@ -268,6 +288,10 @@ Copyright (C) 2007 Stefano Cotta Ramusino <stefano.cotta@openmamba.org>""
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"}
@ -283,7 +307,7 @@ Copyright (C) 2007 Stefano Cotta Ramusino <stefano.cotta@openmamba.org>""
# 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
@ -292,70 +316,85 @@ Copyright (C) 2007 Stefano Cotta Ramusino <stefano.cotta@openmamba.org>""
[ "$src0pckname" = "$specname" ] ||
{ src_name="$src0pckname"
notify.debug "src_name = \"$src_name\""; }
notify.debug "$FUNCNAME: src_name = \"$src_name\""; }
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 [[ "$pckurl" =~ .*://.* ]]; then
local pckurldir="`dirname $pckurl`/"
notify.debug "pckurldir = $pckurldir"
if [ "${apse_enabled[0]}" = "0" ]; then
notify.debug "$FUNCNAME: skipping ${apse_site_name[0]}"
else
if [[ "$pckurl" =~ .*://.* ]]; then
local pckurldir="${pckurl%/*}/"
notify.debug "$FUNCNAME: pckurldir = $pckurldir"
local pcknameverbatim=`basename $pckurlverbatim`
notify.debug "pcknameverbatim = $pcknameverbatim"
local pcknameverbatim="${pckurlverbatim##*/}"
notify.debug "$FUNCNAME: pcknameverbatim = $pcknameverbatim"
curr_curl_url="$pckurldir"
curr_curl_url="$pckurldir"
notify.note $"looking at"" <${NOTE}$curr_curl_url${NORM}> (\`${NOTE}source0${NORM}')..."
notify.note $"looking at"" ${NOTE}(#0)${NORM} \
<${NOTE}$curr_curl_url${NORM}> (\`${NOTE}source0${NORM}')..."
notify.debug "curl \$curr_curl_proxy_opts -s -L \"$curr_curl_url\""
curl $curl_opts_netlink $curr_curl_proxy_opts -s -L "$curr_curl_url" > $fcurlout
let "retval = $?"
notify.debug "\
running: curl $curr_curl_proxy_opts $curr_curl_user_agent_opts -s -L \"$curr_curl_url\""
curl $curl_opts_netlink \
$curr_curl_proxy_opts $curr_curl_user_agent_opts -s -L "$curr_curl_url" \
> $fcurlout
let "retval = $?"
case "$retval" in
0) ;;
6) notify.warning $"couldn't resolve host" ;;
7) notify.warning $"failed to connect to host" ;;
*) notify.warning $"curl error (exit code: $retval)" ;;
esac
case "$retval" in
0) ;;
6) notify.warning $"couldn't resolve host" ;;
7) notify.warning $"failed to connect to host" ;;
*) notify.warning $"curl error (exit code: $retval)" ;;
esac
local svar svalue spck candidate_version
# filter "?var:" expressions
spck=`echo $pcknameverbatim | sed "s,%{?[A-Za-z0-9_]*:.*\(%[A-Za-z0-9_]*\)},\1,"`
local svar svalue spck candidate_version
# filter "?var:" expressions
spck=`echo $pcknameverbatim | \
sed "s,%{?[A-Za-z0-9_]*:.*\(%[A-Za-z0-9_]*\)},\1,"`
while true; do
svar=`echo $spck | sed "\
s,.*%[{]*\([A-Za-z0-9_]*\)[}]*.*,\1,"`
[ "$svar" = "$spck" ] && break
if [ "$svar" = "version" ]; then
svalue="\\\([A-Za-z0-9._]*\\\)"
else
svalue=`rpmvars.solve "%$svar" "$spec_dir/$specname.spec"`
[ "$svalue" = "%$svar" ] && svalue=
fi
spck=`echo $spck | sed "\
s,%[{]*$svar[}]*,$svalue,"`
done
while true; do
svar=`echo $spck | sed "\
s,.*%[{]*\([A-Za-z0-9_]*\)[}]*.*,\1,"`
[ "$svar" = "$spck" ] && break
if [ "$svar" = "version" ]; then
svalue="\\\([A-Za-z0-9._]*\\\)"
else
svalue=`rpmvars.solve "%$svar" "$spec_dir/$specname.spec"`
[ "$svalue" = "%$svar" ] && svalue=
fi
spck=`echo $spck | sed "\
s,%[{]*$svar[}]*,$svalue,"`
done
# remove archiver extension from rexexp to match changes
local pcknameregexp=$(echo [^A-Za-z0-9._-]$spck | sed "\
s,\.gz$,\\\.,
s,\.tgz$,\\\.,
s,\.bz2$,\\\.,
s,\.lzma$,\\\.,
s,\.lz$,\\\.,
s,\.tbz2$,\\\.,")
# remove archiver extension from rexexp to match changes
local pcknameregexp=$(echo [^A-Za-z0-9._-]$spck | \
sed "\
s,\.gz$,\\\.,
s,\.tgz$,\\\.,
s,\.bz2$,\\\.,
s,\.lzma$,\\\.,
s,\.lz$,\\\.,
s,\.tbz2$,\\\.,")
local retval=$?
notify.debug "pcknameregexp = $pcknameregexp"
local retval=$?
notify.debug "$FUNCNAME: pcknameregexp = $pcknameregexp"
if [ $retval -eq 0 ]; then
if [ "${pcknameregexp/(/}" = "${pcknameregexp}" ]; then
notify.warning "* "$"not parametric source0 name; cannot update"
else
candidate_versions=($(\
if [ $retval -eq 0 ]; then
if [ "${pcknameregexp/(/}" = "${pcknameregexp}" ]; then
notify.warning "* "$"not parametric source0 name; cannot update"
else
candidate_versions=($(\
grep -i "$pcknameregexp" $fcurlout | \
sed "\
s,.*$pcknameregexp.*,\1,g
@ -375,98 +414,106 @@ s,\.tbz2$,,
s,\.lz$,," |
sort -t. -n -r -k1 -k2 -k3 -k4 -k5 -k6 -k7 -k8 -k9 -k10 ))
local curr_version_dots new_version_dots candidate_version
curr_version_dots=`echo $SPEC_VERSION | tr -d [0-9][A-Z][a-z]_`
for candidate_version in ${candidate_versions[*]}; do
# skip version with no dots if current version has at least one
# (e.g. date release like 20000110)
new_version_dots=`echo $candidate_version | tr -d [0-9][A-Z][a-z]_`
[ "${#new_version_dots}" = 0 -a ${#curr_version_dots} -gt 0 ] &&
continue
new_version="$candidate_version"
break
done
local curr_version_dots new_version_dots candidate_version
curr_version_dots=`echo $SPEC_VERSION | tr -d [0-9][A-Z][a-z]_`
for candidate_version in ${candidate_versions[*]}; do
# skip version with no dots if current version has at least
# one (e.g. date release like 20000110)
new_version_dots=`echo $candidate_version | \
tr -d [0-9][A-Z][a-z]_`
[ "${#new_version_dots}" = 0 -a \
${#curr_version_dots} -gt 0 ] &&
continue
new_version="$candidate_version"
break
done
fi
fi
if [ "$new_version" ]; then
notify.note "* "$"found version:"" \`${NOTE}$new_version${NORM}'"
last_version="$new_version"
else
notify.debug "$FUNCNAME: no new version found in current site"
fi
fi
fi
# sourceforge.net, sf.net
if [ "${apse_enabled[1]}" = "1" ]; then
notify.note $"looking at"" ${NOTE}(#1)${NORM} \
<${NOTE}${apse_site_name[1]}${NORM}>..."
[ "$src_name" ] || src_name="$specname"
curr_curl_url="http://sourceforge.net/projects/$src_name/files/latest/download"
notify.debug \
"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 = $?"
case "$retval" in
0) ;;
6) notify.warning $"couldn't resolve host" ;;
7) notify.warning $"failed to connect to host" ;;
*) notify.warning $"curl error (exit code: $retval)" ;;
esac
[ "$retval" = "0" ] &&
if [ "$(sed -n "s,.*Invalid Project.*,error,pi" $fcurlout)" != \
"error" ]; then
pck_file=`grep -i -m1 "Location:" $fcurlout | \
grep -i "$src_name" | \
sed -n "s,Location: \(.*\)?.*,\1,pi"`
notify.debug "$FUNCNAME: pck_file = \"$pck_file\""
new_version=`echo $pck_file | sed "s|.*/$src_name-\([0-9]*[0-9.]*[0-9]\)[^0-9]*.*|\1|"`
[ "$new_version" = "$pck_file" ] && new_version=
[ "$src_name" ] && unset src_name
fi
if [ "$new_version" ]; then
notify.note "* "$"found version:"" \`${NOTE}$new_version${NORM}'"
last_version="$new_version"
else
notify.debug "$FUNCNAME: no new version found in current site"
fi
fi
# sourceforge.net, sf.net
local prj_name
notify.note $"looking at"" <${NOTE}http://sourceforge.net${NORM}>..."
prj_name=$specname
[ "$prj_name" ] || notify.error $"\
(bug)"" -- $FUNCNAME: "$"assertion failed:"" \"\$prj_name\" != \"\""
curr_curl_url="http://sourceforge.net/projects/$prj_name/files/latest"
notify.debug "curl \$curr_curl_proxy_opts -s -L \"$curr_curl_url\""
curl $curr_curl_proxy_opts -I -A Linux -s -L "$curr_curl_url" > $fcurlout
let "retval = $?"
case "$retval" in
0) ;;
6) notify.warning $"couldn't resolve host" ;;
7) notify.warning $"failed to connect to host" ;;
*) notify.warning $"curl error (exit code: $retval)" ;;
esac
[ "$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"`
notify.debug "pck_file = \"$pck_file\""
[ "$src_name" ] && unset src_name
new_version=`echo $pck_file | sed "s|.*/\([0-9.]*\)/.*|\1|"`
[ "$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"`
fi
if [ "$new_version" ]; then
notify.note "* "$"found version:"" \`${NOTE}$new_version${NORM}'"
last_version="$new_version"
else
notify.debug "$FUNCNAME: skipping ${apse_site_name[1]}"
fi
# look at the other supported web sites...
# skip perl packages to prevent name confusion; these are checked above via Source0
# skip perl packages to prevent name confusion;
# these are checked above via Source0
if [ ! "$(echo $pckurl | grep "cpan.org")" ]; then
for i in ${!apse_site_name[@]}; do
[ $i -le 1 ] && continue
[ "${apse_enabled[$i]}" = "0" ] &&
{ notify.debug \
"$FUNCNAME: skipping ${apse_site_name[$i]}"; continue; }
notify.note \
$"looking at"" <${NOTE}${apse_site_name[$i]}${NORM}>..."
$"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 "\
curl \$curr_curl_proxy_opts -s -L -F ${apse_put_fields[$i]}${search_name} \"$curr_curl_url\""
curl $curr_curl_proxy_opts -s -L -F \
${apse_put_fields[$i]}${search_name} "$curr_curl_url" > $fcurlout
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 $curr_curl_user_agent_opts -s -L -d \
"${apse_put_fields[$i]}${search_name}" "$curr_curl_url" \
> $fcurlout
else
notify.debug "\
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 = $?"
@ -481,22 +528,44 @@ curl \$curr_curl_proxy_opts -s -L \"$curr_curl_url\""
if [ "$(cat $fcurlout | sed -n "\
s,.*${apse_error_msg[$i]}.*,error,pi")" != "error" ]; then
current_grep="$(echo "${apse_grep[$i]}" | sed -e "s,\${search_name},${search_name},g")"
current_sed="$(echo "${apse_sed[$i]}" | sed -e "s,\${search_name},${search_name},g")"
notify.debug "\
grep -i -m1 \"$current_grep\" \$fcurlout | sed -n \"$current_sed\""
new_version=$(grep -i -m1 "$current_grep" $fcurlout | sed -n "$current_sed")
current_sed="\
$(echo "${apse_sed[$i]}" | sed -e "s,\${search_name},${search_name},g")"
if [ "${apse_grep[$i]}" ]; then
current_grep="\
$(echo "${apse_grep[$i]}" | sed -e "s,\${search_name},${search_name},g")"
notify.debug "\
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"
new_version=$(sed -n "$current_sed" $fcurlout)
fi
if [ "$new_version" ]; then
notify.note "\
* "$"found version:"" \`${NOTE}$new_version${NORM}'"
if [ "$last_version" ]; then
notify.debug "apse.cmpversion \"$last_version\" \"$new_version\""
notify.debug "\
apse.cmpversion \"$last_version\" \"$new_version\""
apse.cmpversion "$last_version" "$new_version"
[ $? -eq 2 ] && last_version="$new_version"
else
last_version="$new_version"
fi
else
notify.debug \
"$FUNCNAME: no new version found in current site"
fi
else
notify.debug "$FUNCNAME: no new version found in current site"
fi
done
done
@ -505,7 +574,7 @@ grep -i -m1 \"$current_grep\" \$fcurlout | sed -n \"$current_sed\""
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}'"
@ -514,12 +583,14 @@ last version of \`${NOTE}$specname${NORM}' found:"" \
retval=$?
if [ $retval -eq 0 ]; then
notify.note $"package \`${NOTE}$specname${NORM}' is already the latest version"
notify.note \
$"package \`${NOTE}$specname${NORM}' is already the latest version"
elif [ $retval -eq 2 ]; then
notify.note $"\
a new version of \`${NOTE}$specname${NORM}' is available!"
else
notify.warning $"a newer version of \`${NOTE}$specname${NORM}' is already installed"
notify.warning $"\
a newer version of \`${NOTE}$specname${NORM}' is already installed"
fi
else
notify.warning $"cannot find a new version of \`$specname'"
@ -530,3 +601,5 @@ a new version of \`${NOTE}$specname${NORM}' is available!"
return $retval
}
} # endif $libapse_is_loaded

View File

@ -1,24 +1,34 @@
#!/bin/bash
# libcfg.lib -- @package@ library for loading the configuration file(s)
# Copyright (C) 2008,2011 Davide Madrisan <davide.madrisan@gmail.com>
# 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=(\
`ls /etc/@package@.conf ~/.@package@ ~/.@package@.d/*.conf 2>/dev/null`)
default_cfg_list=(\
`ls /etc/@package@.conf /etc/@package@.d/*.conf \
~/.@package@ ~/.@package@.d/*.conf 2>/dev/null`)
default_cfg_strlist="/etc/@package@.conf /etc/@package@.d/*.conf"
default_cfg_user_strlist="~/.@package@ ~/.@package@.d/*.conf"
# check if the user configurations file for autospec is present
function config.check4user() {
@ -54,15 +64,6 @@ function config.security() {
[ "$(groups 2>/dev/null | grep $packager_group 2>/dev/null)" ] ||
notify.error $"\
user \`$(id -nu)' does not belong to group \`$packager_group'"
# security check for configuration file(s) groups and permissions
for f in ${default_cfg[0]}; do
cfg_file_mod=(`find $f -printf "%g %m" 2>/dev/null`)
[[ ${cfg_file_mod[0]} = $packager_group &&
"`expr ${cfg_file_mod[1]} : '.*\(.\)'`" = 0 ]] ||
notify.warning $"\
the file \`$f' should be readable only by the group \`$packager_group'"
done
else
notify.warning "\`packager_group' "$"unset in the configuration files"
fi
@ -105,16 +106,41 @@ missing variable in the configuration file"" -- \`$cfg_var'"
done
}
cfg_files_num=0
for cfg_file in ${default_cfg[*]}; do
if [ -e "$cfg_file" ]; then
cfg_files_num=$(($cfg_files_num + 1))
notify.debug $"loading"": \`$cfg_file'..."
[ -r "$cfg_file" ] || notify.error $"cannot read"" \`$cfg_file'"
. "$cfg_file"
# load configuration files
function cfg_load_files() {
local cfg_file
notify.debug "$FUNCNAME: loading configuration files..."
if [ "$1" ]; then
# this will catch some error cases when the files do not exist,
# like /etc/donotexists.conf or /etc/nofiles*.conf
[ "`ls $1 2>/dev/null`" ] ||
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 2>/dev/null` \
`ls $1 2>/dev/null`)
else
# default configuration files
cfgfile_list=(${default_cfg_list[@]})
fi
done
[ "$cfg_files_num" = 0 ] && notify.error $"configuration file not found"
notify.debug "$FUNCNAME: cfgfile_list = (${cfgfile_list[*]})"
unset cfg_file
local cfg_files_num=0
for cfg_file in ${cfgfile_list[*]}; do
if [ -e "$cfg_file" ]; then
cfg_files_num=$(($cfg_files_num + 1))
notify.debug $"loading"": \`$cfg_file'..."
[ -r "$cfg_file" ] || notify.error $"cannot read"" \`$cfg_file'"
. "$cfg_file"
else
notify.error $"configuration file not found"": $cfg_file"
fi
done
[ "$cfg_files_num" = 0 ] && notify.error $"configuration file not found"
}
} # endif $libcfg_is_loaded

View File

@ -1,29 +1,70 @@
#!/bin/bash
# libmsgmng.lib -- @package@ library to manage debug/warning/error messages
# Copyright (C) 2005,2006,2008 Davide Madrisan <davide.madrisan@gmail.com>
# 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.note
# args:
# $1 : message to print
# note:
# 1. debug messages are only printed if 'verbose' is great then '0'
# 2. error notifications are followed by a call to 'EXIT_FUNC'
# or 'exit' if this variable is unset
# (can set to 'return' for instance)
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
}
function notify.error() {
echo -e "${EXIT}"$"ERROR""${NORM}: ${EXIT}${1:-$notify_def_msg}${NORM}" 1>&2
${EXIT_FUNC:-"exit"} 1
}
function notify.note() {
[ ${verbose:-0} -ge 0 ] || return
echo -e "${1:-$notify_def_msg}"
}
# function notify.enable_colors
# enable if possible the colorized output
# args:
# none
function notify.enable_colors() {
if [[ -t 1 && "$TERM" != raw && "$TERM" != dumb ]]; then
ESC=$(echo -en "\033") # ascii ESCape
CRIT="${ESC}[1;31m" # switch on red
NOTE="${ESC}[1;33m" # switch on yellow
WARN="${ESC}[1;31m"
EXIT="${ESC}[1;31m"
NORM=$(echo -en "${ESC}[m\017")
local color_scheme="${1:-default}"
if [ -r ~/.@package@.d/color-theme.${color_scheme} ]; then
. ~/.@package@.d/color-theme.${color_scheme}
notify.debug "loading ~/.@package@.d/color-theme.${color_scheme}"
elif [ -r /etc/@package@.d/color-theme.${color_scheme} ]; then
. /etc/@package@.d/color-theme.${color_scheme}
notify.debug "loading /etc/@package@.d/color-theme.${color_scheme}"
else
notify.warning \
$"unknown color theme \`$color_scheme': colors will be disabled"
ESC= CRIT= NOTE= WARN= EXIT= NORM=
fi
}
@ -36,36 +77,4 @@ function notify.disable_colors() {
ESC= CRIT= NOTE= WARN= EXIT= NORM=
}
# notify family of message handling functions:
# - notify.warning
# - notify.error
# - notify.debug
# - notify.note
# args:
# $1 : message to print
# note:
# 1. debug messages are only printed if 'verbose' is great then '0'
# 2. error notifications are followed by a call to 'EXIT_FUNC'
# or 'exit' if this variable is unset
# (can set to 'return' for instance)
notify_def_msg="<"$"no message"">"
function notify.warning() {
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
${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}"
}
} # endif $libmsgmng_is_loaded

View File

@ -1,39 +1,69 @@
#!/bin/bash
# libnetwork.lib -- @package@ library to get info from internet repositories
# Copyright (C) 2008,2010 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
# function repository.is_reachable()
# check if the server '$1' is reachable (test = DNS lookup query)
notify.debug $"loading"": \`libnetwork.lib'..."
# check if all the needed tools are available
for tool in curl mktemp; do
[ "$(type -p curl)" ] || notify.error $"utility not found"": \`curl'"
done
# 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
# args:
# $1 : server name
function repository.is_reachable() {
local ftpserver="${1/[a-z]*\:\/\//}"
[ "$ftpserver" ] || notify.error $"\
(bug)"" -- $FUNCNAME: "$"missing mandatory arg"" (#1)"
# --ftp | --html
# $1 : package name or regexpr to look for
# $2 : a (temporary) file containing the curl dump
# return value:
# the list of srpm files
function repository.get_srpm_pckname_from_site() {
local ARGS
ARGS=`LC_ALL=C getopt \
-o fh --long ftp,html \
-n "$FUNCNAME" -- "$@"`
[ $? = 0 ] || notify.error $"(bug)"" -- $FUNCNAME: "$"\`getopt' error"
host -W3 $ftpserver >&/dev/null
return $?
}
local is_html="0" is_ftp="0"
eval set -- "$ARGS"
while :; do
case "$1" in
-f|--ftp)
is_ftp="1"
;;
-h|--html)
is_html="1"
;;
--) shift; break ;;
*) notify.error $"\
(bug)"" -- $FUNCNAME: "$"\`getopt' error: bad command \`$1'" ;;
esac
shift
done
[ "$is_ftp" != "$is_html" ] || notify.error $"\
(bug)"" -- $FUNCNAME: "$"usage error (--ftp/--html)"
# function repository.get_pckname_from_HTML()
# ... ADDME ...
function repository.get_pckname_from_HTML() {
local pck_name="$1"
local infile="$2"
@ -48,15 +78,25 @@ function repository.get_pckname_from_HTML() {
notify.debug "$FUNCNAME: infile = \"$infile\""
local pckname_from_HTML=( $(sed -n "\
# remove HTML tags --> get a better input
/<a href=\"/{s|.*<a href=\"\([^\"]*\)\".*|\1|;bm;};
/<A HREF=\"/{s|.*<A HREF=\"\([^\"]*\)\".*|\1|;bm;};
# exit loop if the line do not match the following regexpr
/^$pck_name-[^-]\+-[^-]\+$/bm;be;
:m;/^$pck_name-[^-]\+-[^-]\+$/p;:e" $infile) )
local regexpr
[[ "$pck_name" =~ ^[+a-zA-Z0-9_-]+$ ]] && \
regexpr="^$pck_name-[^-]\+-[^-]\+$" || regexpr="$pck_name"
notify.debug "$FUNCNAME: regexpr = \"$regexpr\""
echo "$pckname_from_HTML"
if [ "$is_html" = "1" ]; then
notify.debug "$FUNCNAME: parsing HTML dump..."
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[*]}"
elif [ "$is_ftp" = "1" ]; then
notify.debug "$FUNCNAME: parsing FTP dump..."
local pckname_from_FTP=($(sed -n "s,.*\ ,,;{/$regexpr/p}" $infile))
echo "${pckname_from_FTP[*]}"
fi
}
# function repository.resolveURL()
@ -175,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"
@ -192,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" ;;
@ -218,12 +258,20 @@ getting list of files from"" \`${NOTE}$currurl/${NORM}'..."
notify.debug "$FUNCNAME: pck_name = $pck_name"
if [ -s "${flist[$i]}" ]; then
got_SPEC_FILENAME=$(\
repository.get_pckname_from_HTML "$pck_name" "${flist[$i]}")
case $currurl in
ftp://*)
got_SPEC_FILENAME=($(\
repository.get_srpm_pckname_from_site --ftp "$pck_name" "${flist[$i]}"))
;;
http://*|https://*)
got_SPEC_FILENAME=($(\
repository.get_srpm_pckname_from_site --html "$pck_name" "${flist[$i]}"))
;;
esac
[ "$got_SPEC_FILENAME" ] &&
{ notify.debug "\
$FUNCNAME: got_SPEC_FILENAME = $got_SPEC_FILENAME"
$FUNCNAME: got_SPEC_FILENAME = ${got_SPEC_FILENAME[*]}"
got_SPEC_FILENAME_URL_LEVEL="$level"
got_SPEC_FILENAME_URL="$currurl"
break 2; }
@ -317,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
@ -376,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
@ -523,8 +571,6 @@ function curl.download() {
notify.note $"downloading"" ${NOTE}$file_name${NORM} ..."
[ "$(type -p curl)" ] || notify.error $"utility not found"": \`curl'"
[ -d "$destdir" ] ||
if [ "$exitonerror" = 1 ]; then
notify.warning $"\
@ -542,10 +588,10 @@ function curl.download() {
pushd $destdir >/dev/null
local retval
notify.debug "curl $curl_options\
notify.debug "curl $curl_opts\
${proxy:+ --proxy $proxy}${proxyuser:+ --proxy-user $proxy_user} $file_url"
curl $curl_options \
curl $curl_opts \
${proxy:+ --proxy $proxy} ${proxyuser:+ --proxy-user $proxy_user} \
"$file_url"
retval=$?
@ -631,8 +677,8 @@ repository-alias:,exit-on-err,debug-unsecure \
[ -e "$upfile" ] || notify.error $"package not found"": \`$upfile'"
# add an extra newline to workaroung a bug in curl
notify.note "
# FIXED: add an extra newline to workaroung a bug in curl
notify.note "\
* ${NOTE}$upfile${NORM}
--> $destfile"
@ -725,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" \
@ -734,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 $"\
@ -763,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)"
@ -781,3 +848,257 @@ curl $options --user \"***:***\" --quote \"DELE $deletefile\" $1"
[[ "$retval" != "0" && "$exitonerror" = 1 ]] && exit 1
}
# function git.download
# helper for creating a tarball from a git repository
# args:
# -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:
# 0
function git.download() {
local ARGS
ARGS=`LC_ALL=C getopt \
-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
case "$1" in
-d|--destdir)
destdir="$2"; shift
notify.debug "$FUNCNAME: destdir = \"$destdir\""
;;
-v|--pck-version)
pck_version="$2"; shift
notify.debug "$FUNCNAME: pck_version = \"$pck_version\""
;;
-p|--proxy)
proxy="$2"; shift
notify.debug "$FUNCNAME: proxy = \"$proxy\""
;;
-u|--proxy-user)
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'" ;;
esac
shift
done
local giturl_and_branch="$1"
notify.debug "$FUNCNAME: giturl_and_branch = \"$giturl_and_branch\""
[ "$giturl_and_branch" ] || notify.error $"\
(bug)"" -- $FUNCNAME: "$"missing mandatory arg"" (#1)"
[ "$destdir" ] || notify.error $"\
(bug)"" -- $FUNCNAME: "$"missing mandatory arg"" (--destdir)"
local token_dirname="${giturl_and_branch%/*}"
local token_basename="${giturl_and_branch##*/}"
notify.debug "$FUNCNAME: token_dirname = \"$token_dirname\""
notify.debug "$FUNCNAME: token_basename = \"$token_basename\""
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 "${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
#
# return value:
# 0
#
# set: spec_source, spec_source_comment, pck_tarball
function git.create_tarball() {
local ARGS
ARGS=`LC_ALL=C getopt -o d:v:p:u: \
--long destdir:,pck-version:,git-branch:,preserve-dot-git:,proxy:,proxy-user:\
-n "$FUNCNAME" -- "$@"`
[ $? = 0 ] || notify.error $"(bug)"" -- $FUNCNAME: "$"\`getopt' error"
local destdir
# FIXME: add support for proxy
# HINT: git config --global http.proxy http://user:pwd@proxy.srv.com:port
# 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
eval set -- "$ARGS"
while :; do
case "$1" in
-d|--destdir)
destdir="$2"; shift
notify.debug "$FUNCNAME: destdir = \"$destdir\""
;;
-v|--pck-version)
pck_version="$2"; shift
notify.debug "$FUNCNAME: pck_version = \"$pck_version\""
;;
--git-branch)
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
notify.debug "$FUNCNAME: preserve_dot_git = \"$preserve_dot_git\""
;;
-p|--proxy)
proxy="$2"; shift
notify.debug "$FUNCNAME: proxy = \"$proxy\""
;;
-u|--proxy-user)
proxy_user="$2"; shift
notify.debug "$FUNCNAME: proxy_user = \"$proxy_user\""
;;
--) shift; break;;
*) notify.error $"\
(bug)"" -- $FUNCNAME: "$"\`getopt' error: bad command \`$1'" ;;
esac
shift
done
local git_repository="$1"
notify.debug "$FUNCNAME: git_repository = \"$git_repository\""
[ "$git_repository" ] || notify.error $"\
(bug)"" -- $FUNCNAME: "$"missing mandatory arg"" (#1)"
[ "$destdir" ] || notify.error $"\
(bug)"" -- $FUNCNAME: "$"missing mandatory arg"" (--destdir)"
type -p git &>/dev/null ||
notify.error $"utility not found"": \`git'"
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"
pushd $tmpgitdir &>/dev/null
# create a tarball by cloning the git repository
notify.note \
"${NOTE}"$"cloning git repository""\
<$git_repository> ${git_branch:+($git_branch)}${NORM}""..."
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
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
rm -fr $tmpgitdir
notify.error $"cannot clone git repository"; }
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
rm -f $pck_tarball/.gitignore
rm -f $pck_tarball/.gitmodules
fi
mv $pck_tarball ${pck_tarball}-${pck_version}
pck_tarball="${pck_tarball}-${pck_version}"
# create a compressed tarball
# FIXME: why bzip2? The compression tool used here should be configurable
notify.note "${NOTE}"$"creating the compressed source tarball""${NORM}..."
tar -cvf ${pck_tarball}.tar $pck_tarball/ >/dev/null &&
bzip2 ${pck_tarball}.tar &&
mv ${pck_tarball}.tar.bz2 $destdir/
if [ $? -eq 0 ]; then
notify.note "\
...${NOTE}"$"done""${NORM}: \`${NOTE}${pck_tarball}.tar.bz2${NORM}'"
else
popd &>/dev/null
rm -fr $tmpgitdir
notify.error $"\
an error occurred while creating"": ${pck_tarball}.tar.bz2"
fi
spec_source="${pck_tarball}.tar.bz2"
notify.debug "$FUNCNAME: spec_source = $spec_source"
spec_source_comment="\
## GITSOURCE $git_repository${git_branch:+ $git_branch}"
notify.debug "$FUNCNAME: spec_source_comment = \"$spec_source_comment\""
pck_tarball="$destdir/${spec_source}"
notify.debug "$FUNCNAME: pck_tarball = $pck_tarball"
popd &>/dev/null
rm -fr $tmpgitdir
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|" )"
@ -573,11 +579,17 @@ $FUNCNAME: * blank unexpanded and undefined variables beginning by \`?'..."
# i.e. 'rpmvars.solve(%{__install_info} $specfile)'
case "$output" in *%*)
notify.debug "$FUNCNAME: * expanding rpm variables, if any..."
# hack to prevent a rpm segfault when evaluating urls containing '%' (e.g. python-pyslsk)
# hack to prevent a rpm segfault when evaluating urls containing '%'
# (e.g. python-pyslsk)
output_prefix=`echo ${output} | sed "s|\(^[a-z]*://\).*|\1|"`
output_suffix=`echo ${output} | sed "s|$output_prefix||"`
notify.debug "$FUNCNAME: rpm --eval \"${output_suffix}\""
output=$(rpm --eval "${output_suffix}")
notify.debug "\
$FUNCNAME: rpm --eval \"$(for i in $(seq 0 1 $(( ${#rpmvar_name[@]} - 1 ))); do
echo "%define ${rpmvar_name[$i]} ${rpmvar_value[$i]}"; done)
${output_suffix}\""
output=$(rpm --eval "$(for i in $(seq 0 1 $(( ${#rpmvar_name[@]} - 1 ))); do
echo "%define ${rpmvar_name[$i]} ${rpmvar_value[$i]}"; done)
${output_suffix}")
output="${output_prefix}${output}"
notify.debug "$FUNCNAME: output = \`$output'" ;;
esac
@ -585,6 +597,82 @@ $FUNCNAME: * blank unexpanded and undefined variables beginning by \`?'..."
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
@ -812,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\""
@ -821,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\""
;;
@ -834,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)
@ -1046,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)
@ -1098,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
@ -1176,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" && \
@ -1238,3 +1338,5 @@ function getversionfromtarball() {
notify.debug "$FUNCNAME: pck_version = \"$pck_version\""
echo "$pck_version"
}
} # endif $libspec_is_loaded

178
lib/libtest.lib.in Normal file
View File

@ -0,0 +1,178 @@
#!/bin/bash
# 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; }
[ -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 "\
libtest.lib: "$"library not found"": @libdir@/libmsgmng.lib" 1>&2
exit 1; }
. @libdir@/libmsgmng.lib
notify.debug $"loading"": \`libtest.lib'..."
[ -n "$testdir" ] ||
notify.error "\`testdir': "$"unset in the configuration files"
[ -d "$testdir" ] ||
notify.error $"no such file or directory"": \`$testdir'"
# do parse the list of skipped test to set 'ignore_test_list_value[]'
ignore_test_list_value=()
OIFS="$IFS"; IFS=','
for token in $ignore_test_list; do
IFS='='; set -- $token
ignore_test_list_value[${#ignore_test_list_value[*]}]="$1";
IFS=','
done
IFS="$OIFS"
notify.debug "ignore_test_list_value = (${ignore_test_list_value[*]})"
# function test.rpms_extract()
# extract the files contained in all the rpm archives build by
# by a single specfile
# args:
# -i|--infofile the file containing infos about packages to extract
# -t|--tmpdir the directory where the files will be extracted to
function test.rpms_extract() {
local rpminfofile tmpextractdir
TEMP=`LC_ALL=C getopt \
-o i:t: --long infofile:,tmpdir: -n "$FUNCNAME" -- "$@"`
[[ $? = 0 ]] || return 1
eval set -- "$TEMP"
while :; do
case "$1" in
-i|--infofile)
rpminfofile="$2"
shift
;;
-t|--tmpdir)
tmpextractdir="$2"
shift
;;
--) shift; break ;;
*) notify.error $"\
(bug)"" -- $FUNCNAME: "$"\`getopt' error" ;;
esac
shift
done
[ "$rpminfofile" ] || notify.error $"\
(bug)"" -- $FUNCNAME: "$"missing mandatory arg"" (--infofile)"
[ -r "$rpminfofile" ] || notify.error $"\
(bug)"" -- $FUNCNAME: "$"cannot read"" \`$rpminfofile'"
[ "$tmpextractdir" ] || notify.error $"\
(bug)"" -- $FUNCNAME: "$"missing mandatory arg"" (--tmpdir)"
[ -d "$tmpextractdir" ] || notify.error $"\
(bug)"" -- $FUNCNAME: "$"no such file or directory"" \`$tmpextractdir'"
. $rpminfofile
local i=0
for pck in ${rpmpkg_name[@]}; do
[[ -e "$pck" ]] &&
notify.note " * $pck" ||
notify.error $"package not found"": \`$pck'"
mkdir -p $tmpextractdir/$i 2>/dev/null
[ $? -eq 0 ] || notify.error $"\
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"
cpio --quiet --extract --make-directories < rpm_extract_tmp.cpio
[ $? -eq 0 ] ||
notify.error $"cannot extract files from cpio archive"
rm -f rpm_extract_tmp.cpio
popd >/dev/null
let "i += 1"
done
}
function test.skip() {
local test n found
test="$1"
let "found = 0"
for n in ${ignore_test_list_value[*]}; do
[ "$n" = "$test" ] && let "found = 1"
done
return $((!$found))
}
function test.num2str() {
[ $test_number -le 9 ] && echo " $test_number" || echo " $test_number"
}
function test.runall() {
local ARGS
ARGS=`LC_ALL=C getopt \
-o s:p --long specfile:,packages \
-n "$FUNCNAME" -- "$@"`
[ $? = 0 ] || notify.error $"(bug)"" -- $FUNCNAME: "$"\`getopt' error"
local specfile
local test_specfile=0
local test_packages=0
eval set -- "$ARGS"
while :; do
case "$1" in
-s|--specfile)
test_specfile=1
specfile="$2"
shift
;;
-p|--packages)
test_packages=1
;;
--) shift; break ;;
*) notify.error $"\
(bug)"" -- $FUNCNAME: "$"\`getopt' error: bad command \`$1'" ;;
esac
shift
done
[ -n "$testdir" ] ||
notify.error "\`testdir': "$"unset in the configuration files"
[ -d "$testdir" ] ||
notify.error $"no such file or directory"": \`$testdir'"
local test_number=1
local fname
[ $test_specfile -gt 0 ] &&
for fname in $testdir/test*_spec*; do
notify.debug "$FUNCNAME: running test: \`$fname'"
. $fname
specfile.checksyntax "$specfile"
done
[ $test_packages -gt 0 ] &&
for fname in $testdir/test*_pkg*; do
notify.debug "$FUNCNAME: running test: \`$fname'"
. $fname
alltests --infofile "$tmpextractdir/rpmpkg.info" \
--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

@ -1,8 +1,8 @@
.TH AUTOSPEC "9" "@date_my@" "@package@ @version@" "User Commands"
.SH NOME
\fB@package@\fR - script di frontend per la creazione e l'aggiornamento e la verifica di pacchetti rpm.
\fB@package@\fR - frontend per la creazione e l'aggiornamento e la verifica di pacchetti rpm.
.br
\fBconfig-getvar\fR - plugin per la visualizzazione di variabili presenti nei file di configurazione di autospec.
\fBconfig-getvar\fR - plugin per visualizzare le variabili presenti nei file di configurazione.
.br
\fBpck-extract\fR - plugin per l'estrazione di file da archivi srpm.
.br
@ -12,48 +12,186 @@
.br
\fB@pck_lib@\fR - libreria di funzioni per l'analisi degli specfile.
.B
\fBlibapse.lib\fR - libreria del motore di ricerca 'Autospec Package Search Engine'.
.br
\fBlibcfg.lib\fR - libreria per il caricamento dei file di configurazione.
.br
\fBlibmsgmng.lib\fR - libreria per gestire i messaggi di debug/warning/errore.
.br
\fBlibnetwork.lib\fR - libreria per la gestione delle operazioni di rete.
.br
\fBlibtest.lib\fR - libreria con le funzioni del framework di test.
.SH VERSIONE
Questo documento e' aggiornato alla versione 1.8.2 di @package@.
Questo documento e' aggiornato alla versione 1.16.5 di
.B @package@.
.SH DESCRIZIONE
@package@ e' una suite di script che permette di velocizzare ed automatizzare una parte
delle operazioni necessarie alla creazione, al mantenimento (aggiornamento) dei pacchetti
rpm di una intera distribuzione ed al controllo di comuni errori e vulnerabilita'.
.br
@package@ e' modulare ed altamente configurabile e quindi facilmente adattabile alle
.B @package@
e' costituito da un frontend (lo script autospec propriamente detto) e da una suite di
script che permetteno di \fIvelocizzare\fP ed \fIautomatizzare\fP una parte importante
delle operazioni necessarie alla creazione, al mantenimento (aggiornamento) dei
pacchetti rpm di una intera distribuzione ed al controllo di comuni errori e
vulnerabilita'.
.B @package@
e' modulare ed altamente \fIconfigurabile\fP e quindi facilmente adattabile alle
particolarita' specifiche di ogni distribuzione basata su pacchetti rpm.
.br
@package@ fornisce inoltre la libreria @pck_lib@, utilizzabile anche da script di shell
.B @package@
fornisce inoltre la libreria \fB@pck_lib@\fR, utilizzabile anche da script di shell
esterni per ricavare in modo semplice informazioni su un qualsiasi specfile dato in input.
.B Le restanti librerie non sono state concepite per essere utilizzate da script
esterni ma piuttosto come ulteriore modularizzazione del codice.
.B @package@
e' stato utilizzato con successo dagli sviluppatori della distribuzione
.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
(\fIhttp://www.openmamba.org\fP) per creare specfile, per aggiornare i pacchetti dei branch
di sviluppo e dei contributors e per effettuare il porting (amche in cross-compilazione)
dei pacchetti in architetture diverse.
.SH FILE DI CONFIGURAZIONE
@package@ legge all'avvio in primo luogo il file globale \fI@sysconfdir@/@pck_conf@\fR
e quindi i file privati dell'utente: \fI~/.@package@\fR e/o \fI~/.@package@.d/*.conf\fR.
E' buona norma non modificare direttamente il file globale.
Utilizzare i file privati per tale scopo.
.B @package@
legge all'avvio i file globali \fI@sysconfdir@/@package@.conf\fR
e \fI@sysconfdir@/@package@.d/*.conf\fR e quindi i file privati dell'utente:
\fI~/.@package@\fR e/o \fI~/.@package@.d/*.conf\fR.
E' buona norma non modificare direttamente i file globali.
Utilizzare i file privati per ridefinire variabili oppure modularizzare la configurazione.
.TP
Qui di seguito e' presentato un esempio di file di configurazione utente per \fB@package@\fR che potra' essere utilizzato da un contributore come fac-simile per creare il proprio file di configurazione personale.
.if t .sp 0.5
.if n .sp 1
.RS
.PD 0
.TP
[~/.@package@]
.TP
# [configuration file for `@package@']
.TP
proxy=
.TP
proxy_user=
.TP
packager_fullname="<Your Name>"
.TP
packager_email="<email>@openmamba.org"
.TP
ftp_rw_user[1]="<user>"
.TP
ftp_rw_passwd[1]="<passwd>"
.TP
arch_list=(i586 arm x86_64 aarch64)
.TP
curl_opts_netlink="--connect-timeout 15 --retry 3 --limit-rate 250k"
.PD
.RE
.TP
Ecco un esempio di modularizzazione possibile:
.if t .sp 0.5
.if n .sp 1
.RS
.PD 0
.TP
~/.@package@.d/00-devel.conf
.TP
~/.@package@.d/01-devel-my.conf
.TP
~/.@package@.d/02-devel-kde4.conf
.TP
~/.@package@.d/03-devel-makedist.conf
.TP
~/.@package@.d/04-devel-autodist.conf
.TP
~/.@package@.d/05-devel-future.conf
.PD
.RE
.TP
In ogni file vi sono le informazioni di connessione al \fIrepository\fP specificato dal nome del file. Ad esempio (repository in sola lettura):
.if t .sp 0.5
.if n .sp 1
.RS
.PD 0
.TP
$ cat ~/.@package@.d/05-devel-autodist.conf
.TP
ftp_alias[5]="autodist"
.TP
ftpurl_ro_rpms[5]="http://www.openmamba.org/pub/openmamba/devel-autodist/RPMS.@arch@"
.TP
ftpurl_ro_srpms[5]="http://www.openmamba.org/pub/openmamba/devel-autodist/SRPMS.base"
.TP
ftp_enable[5]="1"
.PD
.RE
.TP
e (repository personale in lettura e scrittura):
.if t .sp 0.5
.if n .sp 1
.RS
.PD 0
.TP
$ cat ~/.@package@.d/01-devel-my.conf
.TP
ftp_alias[2]="\fI<myrepos>\fP"
.TP
ftpurl_ro_rpms[2]="http://www.openmamba.org/pub/openmamba/devel-\fI<my_alias>\fP/RPMS.@arch@"
.TP
ftpurl_ro_srpms[2]="http://www.openmamba.org/pub/openmamba/devel-\fI<my_alias>\fP/SRPMS.base"
.TP
ftp_rw_server[2]="ftp://ftpaccounts.openmamba.org"
.TP
ftp_rw_passive_mode[2]=on
.TP
ftp_rw_user[2]="\fI<my_repository_alias>\fP"
.TP
ftp_rw_passwd[2]="\fI<passwd>\fP"
.TP
ftp_rw_rpms_dir[2]="/RPMS.@arch@"
.TP
ftp_rw_srpms_dir[2]="/SRPMS.base"
.TP
arch_list[2]="i586"
.TP
arch_noarch_upload[2]="@arch@"
.TP
ftp_enable[2]="1"
.PD
.RE
.SH SINTASSI
@package@ e' lo script principale ed ha funzione di frontend per una serie di script e
\fB@package@\fR e' lo script principale ed ha funzione di \fIfrontend\fP per una serie di script e
librerie specializzate.
Per questo motivo sono possibili differenti modalita' distinte di utilizzo.
Si ricorda che le opzioni indicate tra parentesi quadre sono opzionali.
.SS "Creazione di specfile"
\fB@package@\fR \
\fB\-s\fR \fItarball\fR \
\fB\-s\fR \fIarchivio\fR \
[\fB\-n\fR \fIname\fR] \
[\fB\-v\fR \fIver\fR] \
[\fB\-t\fR \fItype\fR] \
[\fB\-o\fR \fIoutfile\fR]
[\fB\-o\fR \fIoutfile\fR] \
[\fB\--changelog\fR \fI"messaggio"\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 il \fItarball\fR indicato
cerca di creare uno specfile per l'\fIarchivio\fR indicato
.TP
\fB\-n\fR, \fB\-\-pck\-name\fR
nome del pacchetto (default: ricavato dal nome del tarball)
nome del pacchetto (default: ricavato dal nome dell'archivio)
.TP
\fB\-v\fR, \fB\-\-pck\-version\fR
versione del pacchetto (default: ricavato dal nome del tarball)
versione del pacchetto (default: ricavato dal nome dell'archivio)
.TP
\fB\-t\fR, \fB\-\-type\fR
categoria dello specfile da generare:
@ -62,42 +200,83 @@ 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
.TP
\fB\-\-changelog\fR
permette di scegliere un messaggio di ChangeLog diverso da quello di default
.TP
\fB<opzioni\-git>\fR
.br
\fB\-\-git\-branch\fR : specifica un branch git
.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
\fB@package@\fR \fB\-s\fR ~/software/@package@-@version@.tar.bz2 \fB\-t\fR standard \fB\-o\fR @package@.spec
.TP
\fB@package@\fR \fB\-s\fR ftp://ftp.gnu.org/pub/gnu/bash/bash-4.2.tar.gz
.TP
\fB@package@\fR \fB\-s\fR \\
.TP
http://ovh.dl.sourceforge.net/sourceforge/avifile/avifile-0.7-0.7.45.tar.bz2 \\
\fB\-t\fR library \fB\-n\fR libavifile \fB\-v\fR 0.7.45 \\
\fB\-o\fR /usr/src/RPM/SPECS/libavifile.spec
.TP
\fB@package@\fR \fB\-s\fR @package@-@version@.tar.bz2 \fB\-\-changelog\fR "First build"
.TP
\fB@package@\fR \fB\-s\fR git://anongit.freedesktop.org/gstreamer/gst-omx \\
\fB\-\-git-branch\fR="raspberry" \fB\-\-preserve-dot-git\fR \fB\-o\fR gst-omx.spec
.TP
\fB@package@\fR \fB\-s\fR \fB\-\-help\fR
.PD
.RE
.SS "Aggiornamento di pacchetti rpm"
\fB@package@\fR \
\fB\-u\fR \fIpck\fR \fB\-a\fR \fIlst\fR [\fIver\fR] [\fIrel\fR] \
\fB\-u\fR \fIpck\fR \fB\-a\fR \fIazioni\fR [\fIver\fR] [\fIrel\fR] \
[\fB\-d\fR \fIv1=r1\fR[,\fIv2=r2\fR,...]] \
[\fB\-\-server\-download\fR \fIint\fR] \
[\fB\-\-server\-upload\fR \fIint\fR] \
[\fB\-l\fR \fIusr\fR:\fIpswd\fR] \
[\fB\-l\fR \fIutente\fR:\fIpasswd\fR] \
[\fB\-S\fR \fIspecfile\fR] \
[\fB\-A\fR \fIarch\fR] \
[\fB\-\-changelog\fR "\fImsg\fR" ] \
[\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 automaticamente il pacchetto \fIpck\fR, versione \fIver\fR,
aggiorna il pacchetto \fIpck\fR, versione \fIver\fR,
release \fIrel\fR
.TP
\fB\-a\fR, \fB\-\-action\fR
Esegue la lista di azioni separate da virgole \fIlst\fR
Esegue la lista di azioni separate da virgole \fIazioni\fR:
.br
\fI0\fR. indica le versioni del pacchetto disponibili nei repository
.br
@ -156,7 +335,7 @@ server dove effettuare l'upload dei pacchetti
server per l'upload e il download dei pacchetti
.TP
\fB\-l\fR, \fB\-\-login\fR
user \fIusr\fR e password \fIpswd\fR per effettuare l'upload sul sito FTP
user \fIutente\fR e password \fIpasswd\fR per effettuare l'upload sul sito FTP
.TP
\fB\-S\fR, \fB\-\-specfile\fR
nome dello specfile (default: \fIname\fR.spec)
@ -178,6 +357,12 @@ crea soltanto il pacchetto srpm (azione 5)
.br
non effettua l'upload dei pacchetti rpm (azione 10)
.TP
\fB\-\-list-check\fR
esegue un controllo dei file non pacchettizzati (azione 5)
.TP
\fB\-b\fR, \fB\-\-update\-autobuildreq\fR
aggiorna il blocco AUTOBUILDREQ-BEGIN .. AUTOBUILDREQ-END
.TP
\fB\-c\fR, \fB\-\-clear\fR
rimuove tutti i file temporanei
.TP
@ -190,8 +375,69 @@ abilita il log su file (nella directory: `$logging_dir')
\fB\-R\fR, \fB\-\-rebuild\fR
attiva modalita' ed impostazioni di rebuild (azione 4)
.TP
\fB\-R\fR, \fB\-\-root\fR
\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
# scarica il pacchetto srpm dal repository 'devel'
.TP
\fB@package@\fR \fB\-u\fR @package@ \fB\-a\fR1 \fB\-\-server\fR=devel
.TP
# aggiorna lo specfile alla versione @version@ definendo un messaggio di changelog...
.TP
\fB@package@\fR \fB\-u\fR @package@ @version@ \fB\-a\fR4 \fB\-\-changelog\fR "update to @version@"
.TP
# ...oppure aggiorna lo specfile incrementando soltanto il numero di release
.TP
\fB@package@\fR \fB\-u\fR @package@ \fB\-a\fR4 \fB\-\-rebuild\fR
.TP
# esegue le azioni 5,6,7,8,9 definendo la variabile rpm 'addons_ver'
.TP
# ed abilitando il logging su file
.TP
\fB@package@\fR \fB\-u\fR @package@ \fB\-\-log\fR \fB\-a\fR5,6:9 \fB\-\-define\fR addons_ver=0.9
.TP
# forza il rebuild dei pacchetti rpm e srpm (necessario se i pacchetti esistono gia')
.TP
\fB@package@\fR \fB\-u\fR @package@ \fB\-r\fR \fB\-a\fR5 \fB\-\-force-build\fR
.TP
# scarica l'srpm, ricompila i pacchetti incrementando la release e indicando una architettura
.TP
\fB@package@\fR \fB\-u\fR @package@ \fB\-a\fR1,4,5,8 \fB\-\-arch\fR=noarch \fB\-\-rebuild\fR
.TP
# crea la lista dei build requirement
.TP
\fB@package@\fR \fB\-u\fR @package@ \fB\-a\fR6
.TP
# esegue i test su specfile e pacchetti rpm alla ricerca di problemi tipici
.TP
\fB@package@\fR \fB\-u\fR @package@ \fB\-a\fR8
.TP
# effettua l'upload dei pacchetti srpm e rpm su uno specifico server (vedi 'ftp_alias')
.TP
\fB@package@\fR \fB\-u\fR \fB\-c\fR \fB\-l\fR usr:pswd @package@ @version@ \fB\-a\fR10 \fB--server-upload\fR=0
.TP
\fB@package@\fR \fB\-u\fR @package@ @version@ \fB\-a\fR10 \fB--server-upload\fR=myrepos
.TP
# effettua l'upload del solo file srpm utilizzando i dati di /var/tmp/specs/@package@.spec
.TP
\fB@package@\fR \fB\-u\fR @package@ \fB\-a\fR10 \fB\-\-norpm\fR \fB\-S\fR /var/tmp/specs/@package@.spec
.TP
# forza l'installazione dei pacchetti
.TP
\fB@package@\fR \fB\-u\fR @package@ \fB\-a\fR11 \fB\-\-force\fR
.TP
\fB@package@\fR \fB\-u\fR \fB\-\-help\fR
.PD
.RE
.SS "Estrazione di file da pacchetti srpm"
\fB@package@\fR \
@ -205,6 +451,17 @@ estrae dal pacchetto srpm \fIsrpm_pck\fR...
.TP
\fB\-\-destdir\fR
salva i file estratti nella cartella \fIdir\fR
.TP
\fIEsempi\fR
.TP
.PD 0
\fB@package@\fR \fB\-x\fR @package@\-@version@\-1mamba.src.rpm \fB\-\-destdir=\fR/tmp/
.TP
\fB@package@\fR \fB\-x\fR @package@\-@version@\-1mamba.src.rpm \fB\-F\fR \e*.spec \fB\-\-destdir=\fR/tmp/
.TP
\fB@package@\fR \fB\-x\fR \fB\-\-help\fR
.PD
.RE
.SS "Richiesta del valore di variabili presenti nei file di configurazione"
\fB@package@\fR \
@ -213,10 +470,21 @@ salva i file estratti nella cartella \fIdir\fR
\fB\-C\fR, \fB\-\-config\fR
utilizza un file di configurazione alternativo \fIconf_file\fR
.br
file di default: \fI@sysconfdir@/@pck_conf@\fR, \fI~/.@package@\fR
file di default: vedere alla sezione \fBFILE DI CONFIGURAZIONE\fR
.TP
\fB\-\-eval\fR
stampa il valore che \fIvar\fR assume nei file di configurazione
.TP
\fIEsempi\fR
.TP
.PD 0
\fB@package@\fR \fB\-q\fR \fB\-\-eval\fR="logging_dir"
.TP
\fB@package@\fR -C /etc/@package@.d/02-specfile-rpm-groups.conf \fB\-\-eval\fR=rpm_allowed_groups
.TP
\fB@package@\fR \fB\-\-eval\fR \fB\-\-help\fR
.PD
.RE
.SS "Modalita' operative"
Sono inoltre disponibili alcune opzioni standard ed alcune opzioni di uso generale
@ -231,53 +499,21 @@ stampa il numero di versione e termina il programma
\fB\-q\fR, \fB\-\-quiet\fR
non stampa alcun dettaglio delle operazioni in esecuzione
.TP
\fB\-r\fR, \fB\-\-colorize\fR
abilita l'output colorato
\fB\-\-colors\fR \fI<tema-di-colori>\fR
abilita l'output colorato descritto dal tema \fI<tema-di-colori>\fR.
.br
I temi disponibili sono: \fIterminal-dark\fR, \fIterminal-white\fR e \fIweb\fR.
.br
Altri temi possono essere aggiunti dagli utenti, ad esempio il tema \fIterminal-custom\fR,
creando il file:
.br
\fI~/.@package@.d/color-theme.terminal-custom\fR
.br
Si vedano come esempio i file /etc/@package@.d/color-theme.*
.TP
\fB\-D\fR, \fB\-\-debug\fR
attiva la modalita' di debugging (output prolisso)
.SH "ESEMPI"
.B
@package@
\fB\-s\fR ~/software/@package@\-@version@.tar.bz2 \fB\-t\fR standard \fB\-o\fR @package@.spec
.br
.B
@package@
\fB\-s\fR ftp://ftp.gnu.org/pub/gnu/bash/bash-3.2.tar.gz
.br
.B
@package@
\fB\-u\fR @package@ @version@ \fB\-a\fR4 \fB\-f\fR \fB\-\-changelog\fR "changelog entry"
.br
.B
@package@
\fB\-\-log\fR \fB\-u\fR @package@ \fB\-a\fR5,7:9 \fB\-\-define\fR addons_ver=0.9
.br
.B
@package@
\fB\-c\fR \fB\-u\fR \fB\-l\fR usr:pswd @package@ @version@ \fB\-a\fR10 \fB--server-upload\fR=0
.br
.B
@package@
\fB\-u\fR @package@ \fB\-a\fR1,4,5 \fB\-\-arch\fR=noarch \fB\-\-rebuild\fR \fB\-\-ignore-test\fR 6,7
.br
.B
@package@
\fB\-u\fR @package@ \fB\-a\fR10 \fB\-\-norpm\fR \fB\-S\fR /var/tmp/specs/@package@.spec
.br
.B
@package@
\fB\-u\fR @package@ \fB\-a\fR11 \fB\-\-force\fR
.br
.B
@package@
\fB\-x\fR @package@\-@version@\-1mamba.src.rpm \fB\-F\fR \e*.spec \fB\-\-destdir=\fR/tmp/specs
.br
.B
@package@
\fB\-q\fR \fB\-C\fR @sysconfdir@/@package@.conf \fB\-\-eval=\fR"logging_dir"
.SH AUTORI
Davide Madrisan <davide.madrisan@gmail.com>
.br
@ -295,16 +531,20 @@ Diverse patch, attivita' diffusa di beta testing.
Codice per la generazione automatica della lista dei build requirements.
Mofiche per permettere l'utilizzo di autospec in multi-architettura.
.SH VEDERE ANCHE
file:///usr/share/doc/@package@-@version@/@package@-it-HOWTO
.SH "BACHI"
Inviare patch, segnalazioni di bachi, richieste di funzionalita' a <davide.madrisan@gmail.com>.
.br
Nel caso di bachi riscontrati, effettuarne una descrizione accurata e possibilmente un modo per riprodurli.
Nel caso di bachi riscontrati, effettuarne una descrizione accurata e possibilmente un modo per
riprodurli.
Per il debugging di un problema e' spesso utile il log completo dell'esecuzione
di \fBautospec\fR con l'opzione \fB\-\-debug\fR, disattivando anche la traduzione dei messaggi,
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

@ -1,6 +1,6 @@
#!/bin/bash
# config-getvar -- plugin for @package@
# Copyright (C) 2007,2008,2010,2011 Davide Madrisan <davide.madrisan@gmail.com>
# Copyright (C) 2007,2008,2010-2012 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; }
@ -13,8 +13,6 @@ me=(${0##*/} "@version@" "@date@")
. @libdir@/libmsgmng.lib
# default values:
# - colorized output (disabled by default)
let "colorize = 0"
# - output verbosity
let "verbose = 1"
@ -24,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 "\
@ -54,19 +51,22 @@ function usage() {
@frontend@ [-C <conf_file>] --eval=<var>
"$"where the above options mean"":
--eval "$"Print the value of the configuration variable <var>""
-C, --config "$"Use an alternate configuration file"" <conf_file>""
"$"Default files:"" ${default_cfg[0]}, ${default_cfg[1]}""
--eval "$"Print the value of the configuration variable <var>""
--colors "$"Select the theme to be used for the colorized output""
-C, --config "$"Use an alternate user configuration file"" <conf_file>""
"$"Default files:"" $default_cfg_strlist""
"$"Default user files:"" $default_cfg_user_strlist""
"$"Operation modes"":
-h, --help "$"Print this help, then exit""
-V, --version "$"Print version number, then exit""
-q, --quiet "$"Run in quiet mode""
-r, --colorize "$"Enable the colorized output""
-D, --debug "$"Run in debugging mode (very verbose output)""
-h, --help "$"Print this help, then exit""
-V, --version "$"Print version number, then exit""
-q, --quiet "$"Run in quiet mode""
-D, --debug "$"Run in debugging mode (very verbose output)""
"$"Samples"":
@frontend@ -q -C ${default_cfg[0]} --eval=\"logging_dir\"
@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>."
@ -95,7 +95,7 @@ done
exec_options=`LC_ALL=C getopt \
-o C:DqrhV \
--long eval:,config:,\
debug,quiet,colorize,help,version,\
debug,quiet,colors:,help,version,\
frontend_opts: \
-n "$me" -- "$@"`
[ $? = 0 ] || exit 1
@ -105,16 +105,16 @@ eval set -- "$exec_options"
while :; do
case $1 in
-C|--config)
cfg_file=$2; shift ;;
--eval)
autospecvar="$2"; shift ;;
--colors)
color_scheme="$2"; shift ;;
-C|--config)
cfg_file=$2; shift ;;
-D|--debug)
let "verbose = 2" ;;
-q|--quiet)
let "verbose = 0" ;;
-r|--colorize)
let "colorize = 1" ;;
-h|--help)
usage 0 ;;
-V|--version)
@ -130,7 +130,7 @@ for arg in $@; do
notify.error $"unrecognized option"" -- \`$arg'"
done
[ "$colorize" = "1" ] && notify.enable_colors
notify.enable_colors "$color_scheme"
# config.getvar()
# Parameters:
@ -146,11 +146,13 @@ function config.getvar() {
local cfg_file_lst
if [ "$cfg_file" ]; then
[ -r $cfg_file ] ||
notify.error $"configuration file not found"" -- \`$cfg_file'"
cfg_file_lst="$cfg_file"
for f in $(ls $cfg_file 2>/dev/null); do
[ -r "$f" ] ||
notify.error $"configuration file not found"" -- \`$f'"
done
cfg_file_lst="$(ls $cfg_file 2>/dev/null)"
else
cfg_file_lst="${default_cfg[*]}"
cfg_file_lst="${default_cfg_list[*]}"
fi
notify.debug "cfg_file_lst = \"$cfg_file_lst\""

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; }
@ -13,8 +14,6 @@ me=(${0##*/} "@version@" "@date@")
. @libdir@/libmsgmng.lib
# default values:
# - colorized output (disabled by default)
let "colorize = 0"
# - output verbosity
let "verbose = 1"
@ -29,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 "\
@ -56,19 +54,22 @@ function usage() {
"$"Extract a given file or list of files from a srpm archive"".
"$"Usage"":
@frontend@ -x -F <file(s)> [--destdir=<dir>] <srpm_pck>
@frontend@ -x -F <file(s)> [-C <conf_file>] [--destdir=<dir>] <srpm_pck>
"$"where the above options mean"":
-x, --extract "$"Extract from the srpm package <srpm_pck>...""
-F, --files "$"...the specified file or list of files <file(s)>""
--destdir "$"Save extracted files in the directory <dir>""
-x, --extract "$"Extract from the srpm package <srpm_pck>...""
-F, --files "$"...the specified file or list of files <file(s)>""
--destdir "$"Save extracted files in the directory <dir>""
--colors "$"Select the theme to be used for the colorized output""
-C, --config "$"Use an alternate user configuration file"" <conf_file>""
"$"Default files:"" $default_cfg_strlist""
"$"Default user files:"" $default_cfg_user_strlist""
"$"Operation modes"":
-h, --help "$"Print this help, then exit""
-V, --version "$"Print version number, then exit""
-q, --quiet "$"Run in quiet mode""
-r, --colorize "$"Enable the colorized output""
-D, --debug "$"Run in debugging mode (very verbose output)""
-h, --help "$"Print this help, then exit""
-V, --version "$"Print version number, then exit""
-q, --quiet "$"Run in quiet mode""
-D, --debug "$"Run in debugging mode (very verbose output)""
"$"Samples"":
@frontend@ -x @package@-@version@-1mamba.src.rpm -F \\*.spec --destdir=/tmp/specs
@ -98,10 +99,10 @@ for arg in $@; do
done
exec_options=`LC_ALL=C getopt \
-o xF:DqrhV \
-o xF:C:DqrhV \
--long \
extract,files:,destdir:,\
debug,quiet,colorize,help,version,\
debug,quiet,colors:,config:,help,version,\
frontend_opts: \
-n "$me" -- "$@"`
[ $? = 0 ] || exit 1
@ -109,6 +110,8 @@ frontend_opts: \
notify.debug "[ ${0} ${exec_options} ]\n"
eval set -- "$exec_options"
cmdline_vars=()
while :; do
case $1 in
-x|--extract) ;;
@ -116,12 +119,21 @@ while :; do
filelst="$2"; shift ;;
--destdir)
destdir="$2"; shift ;;
--colors)
color_scheme="$2"; shift
notify.debug "color_scheme = \"$color_scheme\""
cmdline_vars[${#cmdline_vars[*]}]="color_scheme=\"$color_scheme\""
;;
-C|--config)
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)
let "verbose = 0" ;;
-r|--colorize)
let "colorize = 1" ;;
-h|--help)
usage 0 ;;
-V|--version)
@ -137,7 +149,16 @@ for arg in $@; do
notify.error $"unrecognized option"" -- \`$arg'"
done
[ "$colorize" = "1" ] && notify.enable_colors
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"
# s_rpm_pck : the name of the srpm package (local or remote)
# (i.e. /usr/src/RPM/SRPMS/automake-1.9-1qilnx.src.rpm)
@ -153,16 +174,16 @@ done
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
@ -173,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"
@ -192,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
@ -241,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}"
@ -251,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}"
@ -263,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

File diff suppressed because it is too large Load Diff

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; }
@ -18,8 +18,6 @@ me=(${0##*/} "@version@" "@date@")
. @libdir@/libnetwork.lib
# set default variables
# colorized output (disabled by default)
let "colorize = 0"
# output verbosity
let "verbose = 1"
@ -42,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"
@ -58,19 +60,24 @@ 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
# load the configuration file(s)
[ -r @libdir@/libcfg.lib ] ||
{ echo "$me: "$"library not found"": @libdir@/libcfg.lib" 1>&2
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')
@ -93,7 +100,10 @@ function usage() {
"$"Try to create a specfile for the specified source archive"".
"$"Usage"":
@frontend@ -s <source-archive> [-n <name>] [-v <ver>] [-t <type>] [-o <outfile>]
@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"":
-s, --source "$"Try to create a specfile for the specified source archive""
@ -101,25 +111,40 @@ 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""
--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>""
"$"Default files:"" $default_cfg_strlist""
"$"Default user files:"" $default_cfg_user_strlist""
"$"Operation modes"":
-h, --help "$"Print this help, then exit""
-V, --version "$"Print version number, then exit""
-q, --quiet "$"Run in quiet mode""
-r, --colorize "$"Enable the colorized output""
-D, --debug "$"Run in debugging mode (very verbose output)""
"$"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
"$"Report bugs to <davide.madrisan@gmail.com>."
@ -149,10 +174,12 @@ done
config.check4user
exec_options=`LC_ALL=C getopt \
-o s:n:v:t:o:DqrhV \
-o s:n:v:t:o:C:DqrhV \
--long \
source:,pck-name:,pck-version:,type:,output:,\
debug,quiet,colorize,help,version,\
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: \
-n "$me" -- "$@"`
[ $? = 0 ] || exit 1
@ -160,6 +187,8 @@ frontend_opts: \
notify.debug "[ ${0} ${exec_options} ]\n"
eval set -- "$exec_options"
cmdline_vars=()
while :; do
case $1 in
-s|--source)
@ -175,12 +204,33 @@ while :; do
spec_type=$2; shift ;;
-o|--output)
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)
preserve_dot_git=1 ;;
-D|--debug)
let "verbose = 2" ;;
-q|--quiet)
let "verbose = 0" ;;
-r|--colorize)
let "colorize = 1" ;;
--colors)
color_scheme="$2"; shift
notify.debug "color_scheme = \"$color_scheme\""
cmdline_vars[${#cmdline_vars[*]}]="color_scheme=\"$color_scheme\""
;;
-C|--config)
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)
@ -195,7 +245,16 @@ for arg in $@; do
notify.error $"unrecognized option"" -- \`$arg'"
done
[ "$colorize" = "1" ] && notify.enable_colors
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
@ -234,9 +293,8 @@ function template.expand() {
local OPTIONS=`LC_ALL=C getopt \
-o t:T:n:v:s:l:S:b: \
--long template:,type:,pckname:,pckversion:,setupmacro:,summary:,license:,\
source:,standard-docs:,standard-docs-devel:,build-technology:,\
i18n:,icons-mimetypes:,\
infopages:,manpages:,\
source:,source-comment:,standard-docs:,standard-docs-devel:,\
build-technology:,i18n:,icons-mimetypes:,infopages:,manpages:,\
pck-devel:,pck-library:,pck-apidocs:,pck-tools:,\
shared-libraries:,debug-package:,\
-n "${0}" -- "$@"`
@ -253,6 +311,8 @@ shared-libraries:,debug-package:,\
local spec_setup_macro
local spec_summary="$spec_default_summary"
local spec_license="$spec_default_license"
local spec_source
local spec_source_comment
local standard_docs
local standard_docs_devel
local build_technology
@ -287,6 +347,8 @@ shared-libraries:,debug-package:,\
spec_license="$2"; shift ;;
-S|--source)
spec_source="$2"; shift ;;
--source-comment)
spec_source_comment="$2"; shift ;;
--standard-docs)
standard_docs="$2"; shift ;;
--standard-docs-devel)
@ -337,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"
@ -348,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"
@ -363,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';
@ -413,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,
@ -421,7 +499,8 @@ s,^\(%setup.*\),${spec_setup_macro},
s,\(^[ \t]*Summary[ \t]*:[ \t]*\).*,\1${spec_summary},}
/^[ \t]*License[ \t]*:[ \t]*\.\.\.$/{
s,\(^[ \t]*License[ \t]*:[ \t]*\).*,\1${spec_license},}
s,^\([ \t]*Source[ \t]*:[ \t]*\).*,\1${spec_source},
s,^\([ \t]*Source[ \t]*:[ \t]*\).*,\
${spec_source_comment:+$spec_source_comment\n}\1${spec_source},
s,@make@,$spec_cmd_make,
s,@makeinstall@,$spec_cmd_makeinstall,
s,@build_tool@,$buildrequires_buildtool,
@ -442,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"
@ -467,8 +547,20 @@ function specfile.create() {
# 'pck_tarball' = absolute path of '$1'
local pck_tarball
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##*/}"
spec_source="$2"
@ -488,6 +580,7 @@ ${proxy:+--proxy $proxy} ${proxy_user:+--proxy-user $proxy_user} \
esac
notify.debug "$FUNCNAME: pck_tarball = $pck_tarball"
notify.debug "$FUNCNAME: spec_source = $spec_source"
notify.debug "$FUNCNAME: spec_source_comment = $spec_source_comment"
[ "$pck_tarball" ] || notify.error $"missing tarball name"
@ -495,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
local 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>
@ -506,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'"
local 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, ...)
@ -534,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 $"\
@ -554,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"
@ -648,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
@ -664,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'
@ -717,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
@ -736,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
@ -755,15 +887,21 @@ ${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"
elif [ -e $tmpdir/$pck_rootdir/Makefile ]; then
elif [ -e $tmpdir/$pck_rootdir/Makefile -o \
-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
@ -815,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
@ -836,6 +973,7 @@ $spec_cmd_configure_autotools --enable-gtk-doc"
--summary="$spec_summary" \
--license "$spec_license" \
--source "${spec_preamble_source:-$spec_preamble_tarball}" \
--source-comment "$spec_source_comment" \
--standard-docs "$standard_docs" \
--standard-docs-devel "$standard_docs_devel" \
--build-technology "$build_techology" \

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,89 +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 "Enable the colorized output"
msgstr "Abilita l'output colorato"
msgid "Run in debugging mode (very verbose output)"
msgstr "Attiva la modalità di debugging (output prolisso)"
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 "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,91 +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 configuration file"
msgstr "Utilizza un file di configurazione alternativo"
msgid "Default files:"
msgstr "File di default:"
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 "Enable the colorized output"
msgstr "Abilita 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,23 +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"

View File

@ -1,86 +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 "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"

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,109 +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 "Enable the colorized output"
msgstr "Abilita 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 "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,508 +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 "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 "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 "Enable the colorized output"
msgstr "Abilita 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 "release: formato non supportato"
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 "found too many candidates"
msgstr "trovati troppi pacchetti candidati"
msgid "Repository"
msgstr "Archivio"
msgid "Package(s)"
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 "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"

View File

@ -1,219 +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"
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 "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 "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 "Enable the colorized output"
msgstr "Abilita 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 "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,107 +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 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 "skipped"
msgstr "ignorato"
msgid "checking for \\`$BUILDDIR' (%_builddir) strings"
msgstr "ricerca della stringa \\`$BUILDDIR' (%_builddir)"
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 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 "Quality checks: ${#rpmpkg_name[@]} package(s) checked: ${WARN}$total_issues${NOTE} warning(s)."
msgstr "Controlli di qualità: pacchetti rpm: ${#rpmpkg_name[@]}; problemi riscontrati: ${WARN}$total_issues${NOTE}"

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 "Security checks: ${#rpmpkg_name[@]} package(s) checked: ${WARN}$total_issues${NOTE} warning(s)."
msgstr "Controlli di sicurezza: pacchetti rpm: ${#rpmpkg_name[@]}; problemi riscontrati: ${WARN}$total_issues${NOTE}"

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,19 +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@
@if:debug_package
%debug_package
@fi:debug_package
%description
...
@ -39,6 +33,10 @@ Requires: gtk-doc
%{pkgname} API documentation.
@fi:library_apidocs
@if:debug_package
%debug_package
@fi:debug_package
%prep
%setup -q -n %{pkgname}-%{version}

View File

@ -1,48 +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: ...
#Patch0: %{name}-<pck-version>-<patch-description>.patch
License: ...
## AUTOBUILDREQ-BEGIN
## note: run 'autospec -u -a6 @pck_name@' to get the list of build requirements.
## AUTOBUILDREQ-END
BuildRoot: @rpm_default_buildroot@
@if:debug_package
%debug_package
@fi:debug_package
%description
...
%prep
%setup -q
#%patch0 -p1
%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,125 +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: ...
#Patch0: %{name}-<pck-version>-<patch-description>.patch
License: ...
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: kde-workspace
BuildRoot: @rpm_default_buildroot@
@if:debug_package
%debug_package
@fi:debug_package
%description
...
%prep
%setup -q
#%patch0 -p1
%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@
%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

@ -12,7 +12,6 @@ Distribution: @DISTRO@
Packager: @packager_fullname@ <@packager_email@>
URL: ...
Source: ...
#Patch0: %{name}-<pck-version>-<patch-description>.patch
License: ...
## AUTOBUILDREQ-BEGIN
## note: run 'autospec -u -a6 @pck_name@' to get the list of build requirements.
@ -25,12 +24,8 @@ Requires: lib%{name} = %{?epoch:%epoch:}%{version}-%{release}
@fi:pck_library
@if:infopages
Requires(post): %{__install_info}
Requires(preun): %{__install_info}
@fi:infopages
BuildRoot: @rpm_default_buildroot@
@if:debug_package
%debug_package
@fi:debug_package
%description
...
@ -57,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
@ -91,7 +84,6 @@ This package includes the %{name} API documentation.
%prep
%setup -q
#%patch0 -p1
%build
@if:pck_apidocs
@ -106,20 +98,12 @@ This package includes the %{name} API documentation.
@makeinstall@
@if:i18n
%find_lang %{name}
%find_lang %{name} || touch %{name}.lang
@fi:i18n
%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,23 +8,19 @@ 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/...
#Patch0: %{name}-<pck-version>-<patch-description>.patch
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
...
%prep
%setup -q
#%patch0 -p1
%build
%{__perl} Makefile.PL PREFIX=%{_prefix} INSTALLDIRS=vendor OPTIMIZE="%{optflags}"
@ -46,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@
@ -8,42 +9,42 @@ Distribution: @DISTRO@
Packager: @packager_fullname@ <@packager_email@>
URL: ...
Source: ...
#Patch0: %{name}-<pck-version>-<patch-description>.patch
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
#%patch0 -p1
%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)
%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

@ -8,7 +8,6 @@ Distribution: @DISTRO@
Packager: @packager_fullname@ <@packager_email@>
URL: ...
Source: ...
#Patch0: %{name}-<pck-version>-<patch-description>.patch
License: ...
## AUTOBUILDREQ-BEGIN
## note: run 'autospec -u -a6 @pck_name@' to get the list of build requirements.
@ -18,16 +17,23 @@ BuildRequires: @build_tool@
@fi:buildrequires_buildtool
@if:infopages
Requires(post): %{__install_info}
Requires(preun): %{__install_info}
@fi:infopages
BuildRoot: @rpm_default_buildroot@
@if:debug_package
%debug_package
@fi:debug_package
%description
...
@if:pck_devel
## remove the following two blocks if there's no devel files
%package devel
Group: ...
Summary: Development files for %{name}
Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release}
%description devel
This package contains libraries and header files for developing applications that use %{name}.
@fi:pck_devel
@if:pck_apidocs
%package apidocs
Group: Documentation
@ -41,7 +47,6 @@ This package includes the %{name} API documentation.
%prep
%setup -q
#%patch0 -p1
%build
@if:pck_apidocs
@ -92,6 +97,25 @@ exit 0
## note: eventually add the remaining documents (if any)
# @standard_docs_devel@
@if:pck_devel
## remove this block if there's no devel files
%files devel
%defattr(-,root,root)
## note: this list is just an example; modify as required
# %{_datadir}/aclocal/*.m4
# %{_includedir}/*.h
# %{_includedir}/%{name}
# %{_libdir}/*.a
# %{_libdir}/*.la
# %{_libdir}/*.so
# %{_libdir}/pkgconfig/*.pc
# %{_mandir}/man3/*
@if:infopages
# %{_infodir}/*.info.*
@fi:infopages
@standard_docs_devel@
@fi:pck_devel
@if:pck_apidocs
%files apidocs
%defattr(-,root,root)

View File

@ -8,7 +8,6 @@ Distribution: @DISTRO@
Packager: @packager_fullname@ <@packager_email@>
URL: ...
Source: ...
#Patch0: %{name}-<pck-version>-<patch-description>.patch
License: ...
## AUTOBUILDREQ-BEGIN
## note: run 'autospec -u -a6 @pck_name@' to get the list of build requirements.
@ -18,12 +17,8 @@ BuildRequires: @build_tool@
@fi:buildrequires_buildtool
@if:infopages
Requires(post): %{__install_info}
Requires(preun): %{__install_info}
@fi:infopages
BuildRoot: @rpm_default_buildroot@
@if:debug_package
%debug_package
@fi:debug_package
%description
...
@ -39,9 +34,12 @@ Requires: gtk-doc
This package includes the %{name} API documentation.
@fi:pck_apidocs
@if:debug_package
%debug_package
@fi:debug_package
%prep
%setup -q
#%patch0 -p1
%build
@if:pck_apidocs

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

@ -1,5 +1,5 @@
# Makefile for autospec
# Copyright (C) 2008 by Davide Madrisan <davide.madrisan@gmail.com>
# Copyright (C) 2008,2012 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_tests := test01_pkgquality test02_pkgsecurity
pck_tests := test00_specsyntax test01_pkgquality test02_pkgsecurity
pck_tests_infiles := $(wildcard *.in)
all:
@ -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

292
tests/test00_specsyntax.in Normal file
View File

@ -0,0 +1,292 @@
#!/bin/bash
# test00_specsyntax -- @package@ test (syntax checks of a specfile)
# 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
[ -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
[ "$(type -p $tool)" ] ||
notify.error $"utility not found"": \`$tool'"
done
# function specfile.checksyntax()
# do some syntax checks in the specfile of the building package
# args:
# $1 : specfile name
# $2, ... : execute these check numbers (optional, default = all checks)
function specfile.checksyntax() {
local i rpmvar specfile="$1"
[[ "$specfile" ]] || notify.error $"\
(bug)"" -- $FUNCNAME: "$"missing mandatory arg"" (#1)"
notify.debug "$FUNCNAME: specfile = \"$specfile\""
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)
test.skip $test_number || {
grep -q "^%setup[ \t]*$\|^%setup[ \t]\+" $specfile
if [ $? -eq 0 ]; then
notify.note "$(test.num2str). ${NOTE}"\
"source0""${NORM}..."
if [[ "$source0_name_structure" ]]; then
specfile.getvars -s $specfile --verbatim SPEC_SOURCE0
if [[ "$SPEC_SOURCE0_VERBATIM" ]]; then
[[ "$(echo "$SPEC_SOURCE0_VERBATIM" | \
grep -e "$source0_name_structure")" ]] ||
{ notify.warning "\
\`Source[0]': "$"does not point to a valid internet address"
let "total_issues += 1"; }
fi
fi
fi; }
test_number=$(($test_number + 1))
# 2. check if the patches have standard names
# (see the 'patch_name_structure' var in the configure file)
test.skip $test_number || {
notify.note "$(test.num2str). ${NOTE}"\
$"patch""${NORM}..."
specfile.getvars -s $specfile --verbatim SPEC_PATCH
echo "${SPEC_PATCH_VERBATIM[@]}" | \
for i in `seq 1 1 ${#SPEC_PATCH_VERBATIM[@]}`; do
[[ "${SPEC_PATCH_VERBATIM[$i-1]}" =~ \
$patch_name_structure ]] ||
{ notify.warning "\
patch $i (\`${NOTE}${SPEC_PATCH_VERBATIM[$i-1]}${NORM}') "
notify.warning $"\
not a standard structure (see config file)";
let "total_issues += 1"; }
done; }
test_number=$(($test_number + 1))
# 3. check if `%setup' have `-D' and/or `-T' options
test.skip $test_number || {
notify.note "$(test.num2str). ${NOTE}"\
"%setup""${NORM}..."
[[ "$(cat $specfile | \
sed -n "/%setup/{/-D /p;/-T /p;/-D$/p;/-T$/p}")" ]] &&
{ notify.warning $"\
found \`-D' and/or \`-T' option(s) in the \`%setup' directive"
let "total_issues += 1"; }
}
test_number=$(($test_number + 1))
# 4. check if all the `%files' blocks have a `%defattr' line
# note: skip commented out blocks
test.skip $test_number || {
notify.note "$(test.num2str). ${NOTE}"\
"%defattr""${NORM}..."
[[ "$(sed -e '
# print paragraph if it contains "%files" and "%defattr"
/./{H;$!d;}' -e 'x;/%files/!d;/%defattr/!d' $specfile | \
grep "^[[:space:]]*%files")" != \
"$(grep "^[[:space:]]*%files" $specfile)" ]] &&
{ notify.error $"\
missing at least one \`%defattr' directive"
let "total_issues += 1"; }
}
test_number=$(($test_number + 1))
# 5. check if the rpm macros %configure, %make are used
# - look in the block : `%build' to `%install'
test.skip $test_number || {
notify.note "$(test.num2str). ${NOTE}"\
"%build, %install""${NORM}..."
local token tokens
sed -n '/%build/,/%install/p' $specfile | \
while read -a tokens; do
# ignore comments
[[ "${tokens[0]}" =~ ^\# ]] && continue
for token in ${tokens[*]}; do
case "$token" in
configure|./configure)
[[ "$rpm_macro_configure" ]] &&
{ notify.warning $"\
use rpm macros if possible:"" \`$token' --> \`$rpm_macro_configure'"
let "total_issues += 1"; }
;;
make)
[[ "$rpm_macro_make" ]] &&
{ notify.warning \
$"use rpm macros if possible:""${NORM}
$token --> $rpm_macro_make"
let "total_issues += 1"; }
;;
esac
done
done
# do check between`%install' and `%changelog'
sed -n '/%install/,/%changelog/p' $specfile | \
while read -a tokens; do
# ignore comments
[[ "${tokens[0]}" =~ ^\# ]] && continue
for token in ${tokens[*]}; do
case "$token" in
"make")
[[ "$rpm_macro_make" ]] &&
{ notify.warning \
$"use rpm macros if possible:""${NORM}
$([[ "$rpm_macro_makeinstall" ]] &&
echo " make install -> $rpm_macro_makeinstall"
[[ "$rpm_macro_makeoldinstall" ]] &&
echo " make install -> $rpm_macro_makeoldinstall" )"
} ;;
esac
done
done; }
test_number=$(($test_number + 1))
# 6. check if '%find_lang' is used when localization files are detected
test.skip $test_number || {
notify.note "$(test.num2str). ${NOTE}%find_lang${NORM}..."
# FIXME : the test should perhaps be improved...
grep -q "^[ ]*[^# ]*/share/locale/" $specfile &&
{ notify.error $"\
"$"localization files must be packaged via \`%find_lang'""${NORM}
---------------------------------------
${NOTE}"$"Hint"":${NORM}
%install
...
%find_lang %{name}
%files -f %{name}.lang
---------------------------------------
"
let "total_issues += 1"; }
}
test_number=$(($test_number + 1))
# 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
notify.note "$(test.num2str). ${NOTE}"\
$"package Groups""${NORM}..."" "$"skipped"
else
notify.note "$(test.num2str). ${NOTE}"\
$"package Groups""${NORM}..."
local i j match
for j in `seq 1 1 ${#SPEC_GROUP[*]}`; do
notify.debug "\
$FUNCNAME: checking if \"${SPEC_GROUP[$j-1]}\" is a known group ..."
let "match = 0"
for i in `seq 1 1 ${#rpm_allowed_groups[*]}`; do
notify.debug "\
$FUNCNAME: current group: \"${rpm_allowed_groups[$i-1]}\""
[ "${rpm_allowed_groups[$i-1]}" = \
"${SPEC_GROUP[$j-1]}" ] &&
{ let "match = 1"; break; }
done
[ "$match" = 1 ] ||
{ notify.error "\
"$"invalid \`Group'"" \"${SPEC_GROUP[$j-1]}\"""${NORM}
---------------------------------------
${NOTE}"$"Hint"":${NORM}""
"$"see configuration files"" (\`${NOTE}rpm_allowed_groups${NORM}')
"$"or enter the command"":
${NOTE}@package@ --eval=rpm_allowed_groups${NORM}
---------------------------------------
"
let "total_issues += 1"; }
done
fi; }
test_number=$(($test_number + 1))
# 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
notify.note "$(test.num2str). ${NOTE}"\
$"approved License""${NORM}..."" "$"skipped"
else
notify.note "$(test.num2str). ${NOTE}"\
$"approved License""${NORM}..."
local i j match
for j in `seq 1 1 ${#SPEC_LICENSE[*]}`; do
notify.debug "\
$FUNCNAME: checking if \"${SPEC_LICENSE[$j-1]}\" is an approved license ..."
let "match = 0"
for i in `seq 1 1 ${#rpm_approved_licenses[*]}`; do
notify.debug "\
$FUNCNAME: current license: \"${rpm_approved_licenses[$i-1]}\""
[ "${rpm_approved_licenses[$i-1]}" = \
"${SPEC_LICENSE[$j-1]}" ] &&
{ let "match = 1"; break; }
done
[ "$match" = 1 ] ||
{ notify.warning "\
"$"not approved \`License'"" \"${NOTE}${SPEC_LICENSE[$j-1]}${NORM}\"""
---------------------------------------
${NOTE}"$"Hint"":${NORM}""
"$"see configuration files"" (\`${NOTE}rpm_approved_licenses${NORM}')
"$"or enter the command"":
${NOTE}@package@ --eval=rpm_approved_licenses${NORM}
---------------------------------------
"
let "total_issues += 1"; }
done
fi; }
test_number=$(($test_number + 1))
notify.note "
--> "$"${NOTE}Specfile checks: ${NORM}\
${WARN}$total_issues${NORM} ${NOTE}warnings.${NORM}""
"
return $total_issues
}

View File

@ -1,25 +1,33 @@
#!/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 wc; do
[ "$(type -p $tool)" ] ||
notify.error $"utility not found"": \`$tool'"
done
function alltests() {
# FIXME: add to 'po' file
notify.note " * ${NOTE}"$"performing quality checks""${NORM}""..."
notify.note " ${NOTE}"$"performing quality checks""${NORM}""..."
TEMP=`LC_ALL=C getopt \
-o i:t: --long infofile:,tmpdir: \
@ -62,8 +70,10 @@ function alltests() {
# - symlinks to files in the buildroot directory for rpm
# (usable for a symlink attacks)
# - symlinks not pointing to existing files
notify.note \
" * ${NOTE}"$"checking for wrong symbolic links""${NORM}..."
test.skip $test_number || {
notify.note "$(test.num2str). ${NOTE}"\
$"checking for wrong symbolic links""${NORM}..."
# local rpmbuildroot=`sed -n "/%description/q;{
# /^BuildRoot[ ]*:/{s/[^ ]*[ ]*//;p}}" \
@ -100,17 +110,26 @@ wrong symlink"": \`${NOTE}${f/./}${NORM}' --> \`${NOTE}$(readlink $f)${NORM}'"
done
popd >/dev/null
let "i += 1"
done
done; }
test_number=$(($test_number + 1))
# check for `%buildroot' strings
test.skip $test_number || {
if [ "$rpm_ignores_buildroot" = 1 ]; then
[ "$SPEC_BUILDROOT" ] && notify.note \
" * ${NOTE}"$"checking for \`$SPEC_BUILDROOT' (%buildroot) strings"\
if [ "$SPEC_BUILDROOT" ]; then
notify.note \
"$(test.num2str). ${NOTE}"\
$"checking for \`$SPEC_BUILDROOT' (%buildroot) strings"\
"${NORM}... "$"skipped"
else
notify.note \
"$(test.num2str). ${NOTE}"\
$"checking for %buildroot strings""${NORM}... "$"N/A"
fi
else
notify.note \
" * "$"checking for \`$SPEC_BUILDROOT' (%buildroot) strings"
notify.note "$(test.num2str). "\
$"checking for \`$SPEC_BUILDROOT' (%buildroot) strings"
[ "$SPEC_BUILDROOT" ] || notify.error \
$"(bug)"" -- $FUNCNAME: ""empty string"" (SPEC_BUILDROOT)"
@ -122,6 +141,8 @@ wrong symlink"": \`${NOTE}${f/./}${NORM}' --> \`${NOTE}$(readlink $f)${NORM}'"
notify.warning "${NOTE}${pck##*/}${NORM}"
notify.note "\
${NOTE}$(echo $f | sed "s,$tmpextractdir/$i,," )${NORM}"
notify.note "\
"$"mime type: ""${NOTE}$(file --brief --mime --uncompress $f)${NORM}"
notify.note "$(\
strings -a $f | grep "^$SPEC_BUILDROOT" | sort -bu | \
sed "s,$SPEC_BUILDROOT\(.*\), - [%buildroot]\1,")"
@ -130,12 +151,14 @@ sed "s,$SPEC_BUILDROOT\(.*\), - [%buildroot]\1,")"
popd >/dev/null
let "i += 1"
done
fi
fi; }
test_number=$(($test_number + 1))
# check for `%_builddir' strings
BUILDDIR="$(rpm --eval=%_builddir 2>/dev/null)"
notify.note \
" * ${NOTE}"$"checking for \`$BUILDDIR' (%_builddir) strings""${NORM}... "
test.skip $test_number || {
notify.note "$(test.num2str). ${NOTE}"\
$"checking for \`$BUILDDIR' (%_builddir) strings""${NORM}... "
[ "$BUILDDIR" ] ||
notify.error $"(bug)"" -- $FUNCNAME: ""empty string"" (BUILDDIR)"
@ -148,6 +171,8 @@ sed "s,$SPEC_BUILDROOT\(.*\), - [%buildroot]\1,")"
notify.warning "${NOTE}${pck##*/}${NORM}"
notify.note "\
${NOTE}$(echo $f | sed "s,$tmpextractdir/$i,," )${NORM}"
notify.note "\
"$"mime type: ""${NOTE}$(file --brief --mime --uncompress $f)${NORM}"
notify.note "$(\
strings -a $f | grep "$BUILDDIR" | sort -bu | \
sed "s,$BUILDDIR,[%_builddir],g;s,.*, - &,")"
@ -155,12 +180,14 @@ sed "s,$BUILDDIR,[%_builddir],g;s,.*, - &,")"
done
popd >/dev/null
let "i += 1"
done
done; }
test_number=$(($test_number + 1))
# check for suspected plugins (.la, .so) in devel packages
# note: pure plugins must be in the main package, not in devel
notify.note " * ${NOTE}"$"\
checking for suspicious plugins in devel packages""${NORM}..."
test.skip $test_number || {
notify.note "$(test.num2str). ${NOTE}"\
$"checking for suspicious plugins in devel packages""${NORM}..."
let "i = 0"
for pck in ${rpmpkg_name[@]}; do
@ -178,19 +205,22 @@ grep ' shared object,' | sed -n 's/.\(.*\):.*/\1/p'`; do
done
popd >/dev/null
let "i += 1"
done
done; }
test_number=$(($test_number + 1))
# check for wrong file attributes in lib and bin dirs
notify.note " * ${NOTE}"$"\
checking for wrong file attributes in bin and lib directories""${NORM}..."
test.skip $test_number || {
notify.note "$(test.num2str). ${NOTE}"\
$"checking for wrong file attributes in bin and lib directories""${NORM}..."
warning=0
let "i = 0"
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 \
@ -215,17 +245,50 @@ ${NOTE}"$"Hint"":${NORM}
%defattr(-,root,root)
...
%attr(0755,root,root) %{_bindir}/<program>
-----------------------------"
-----------------------------"; }
test_number=$(($test_number + 1))
# check for libraries with undefined symbols
test.skip $test_number || {
notify.note "$(test.num2str). ${NOTE}"\
$"checking for libraries with undefined symbols after relocation""${NORM}..."
let "i = 0"
local undefsyms
for pck in ${rpmpkg_name[@]}; do
# skip debug packages
[[ "${pck##*/}" =~ -debug- ]] && { let "i += 1"; continue; }
pushd $tmpextractdir/$i >/dev/null
for f in `find -mindepth 1 -type f \
\( -name *\.so\.* -not -name *.debug \) -exec file {} \; | \
grep 'shared object' | sed -n 's/.\([^:]*\):.*/\1/p'`; do
undefsyms="\
$(LC_ALL=C ldd -d -r "$f" 2>/dev/null |& grep "undefined symbol")"
if [ "$undefsyms" ]; then
notify.warning "${NOTE}${pck##*/}${NORM}"
echo -n "${CRIT}"
LC_ALL=C ldd -d -r "$f" 2>&1 | \
grep "undefined symbol" | sed "s,.*, - &,"
echo -n "${NORM}"
let "total_issues += 1"
fi
done
popd >/dev/null
let "i += 1"
done; }
test_number=$(($test_number + 1))
# check for binary files in etc (see FHS-2.2)
notify.note " * ${NOTE}"$"\
checking for binary files installed in /etc (see FHS)""${NORM}..."
test.skip $test_number || {
notify.note "$(test.num2str). ${NOTE}"\
$"checking for binary files installed in /etc (see FHS)""${NORM}..."
warning=0
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" &&
@ -245,12 +308,13 @@ ${NOTE}"$"Hint"":${NORM}
%defattr(-,root,root)
...
%attr(0644,root,root) %{_sysconfdir}/<...file>
-----------------------------" #|| exit 1
-----------------------------"; } #|| exit 1
test_number=$(($test_number + 1))
# check for installation code needed by info pages
notify.note \
" * ${NOTE}"$"\
checking if the info catalog is updated when necessary""${NORM}..."
test.skip $test_number || {
notify.note "$(test.num2str). ${NOTE}"\
$"checking if the info catalog is updated when necessary""${NORM}..."
error=0
let "i = 0"
@ -263,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" ]] &&
@ -291,11 +365,13 @@ $([[ "$rpm_macro_uninstallinfo" ]] &&
exit 0
---------------------------------------"
let "total_issues += $error"; }
done
done; }
test_number=$(($test_number + 1))
# check packages for wrong user and/or group ownerships
notify.note " * ${NOTE}"$"\
checking packages for wrong user and/or group ownerships""${NORM}..."
test.skip $test_number || {
notify.note "$(test.num2str). ${NOTE}"\
$"checking packages for wrong user and/or group ownerships""${NORM}..."
error=0
idun="$(id -un)" idgn="$(id -gn)"
@ -315,11 +391,13 @@ package not found"": \`${pck##*/}'"
let "total_issues += 1"
fi
done )
done
done; }
test_number=$(($test_number + 1))
# check for desktop files installed in non standard applnk dir
notify.note " * ${NOTE}"$"\
checking packages for desktop files installed in the applnk dir""${NORM}..."
test.skip $test_number || {
notify.note "$(test.num2str). ${NOTE}"\
$"checking packages for desktop files installed in the applnk dir""${NORM}..."
warning=0
rpmdatadir=$(rpm --eval %_datadir 2>/dev/null)
@ -344,19 +422,23 @@ checking packages for desktop files installed in the applnk dir""${NORM}..."
${NOTE}"$"Hint"":${NORM}
"$"create desktop files for:"" ${rpmdatadir}/applications
"$"see:"" <http://www.freedesktop.org/>
-----------------------------"
-----------------------------"; }
test_number=$(($test_number + 1))
# check if a package that do not contains binaries is tagged noarch
notify.note \
" * ${NOTE}"$"checking for packages with bad BuildArch tag""${NORM}..."
test.skip $test_number || {
notify.note "$(test.num2str). ${NOTE}"\
$"checking for packages with bad BuildArch tag""${NORM}..."
warning=0
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
@ -371,9 +453,11 @@ ${NOTE}"$"Hint"":${NORM}
BuildArch: noarch
-----------------------------"
let "total_issues += 1"; }
fi
fi; }
test_number=$(($test_number + 1))
notify.note "\
--> ${NOTE}"$"Quality checks: ${#rpmpkg_name[@]} \
package(s) checked: ${WARN}$total_issues${NOTE} warning(s).""${NORM}"
notify.note "
--> "$"${NOTE}Quality checks: ${#rpmpkg_name[@]} \
package(s) checked: ${NORM}${WARN}$total_issues${NORM}${NOTE} warning(s).${NORM}""
"
}

View File

@ -1,25 +1,34 @@
#!/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
[ "$(type -p $tool)" ] ||
notify.error $"utility not found"": \`$tool'"
done
function alltests() {
# FIXME: add to 'po' file
notify.note " * ${NOTE}"$"performing security checks""${NORM}""..."
notify.note " ${NOTE}"$"performing security checks""${NORM}""..."
TEMP=`LC_ALL=C getopt \
-o i:t: --long infofile:,tmpdir: \
@ -70,8 +79,9 @@ function alltests() {
local total_issues=0
notify.note \
" * ${NOTE}"$"checking for RPATH vulnerabilities""${NORM}..."
test.skip $test_number || {
notify.note "$(test.num2str). ${NOTE}"\
$"checking for RPATH vulnerabilities""${NORM}..."
let "i = 0"
for pck in ${rpmpkg_name[@]}; do
@ -79,7 +89,7 @@ function alltests() {
# 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
@ -91,15 +101,17 @@ function alltests() {
done
popd >/dev/null
let "i += 1"
done
done; }
test_number=$(($test_number + 1))
notify.note \
" * ${NOTE}"$"checking for setuid binaries""${NORM}..."
test.skip $test_number || {
notify.note "$(test.num2str). ${NOTE}"\
$"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"
@ -107,10 +119,12 @@ function alltests() {
done
popd >/dev/null
let "i += 1"
done
done; }
test_number=$(($test_number + 1))
notify.note \
" * ${NOTE}"$"checking for setgid directories""${NORM}..."
test.skip $test_number || {
notify.note "$(test.num2str). ${NOTE}"\
$"checking for setgid directories""${NORM}..."
let "i = 0"
for pck in ${rpmpkg_name[@]}; do
@ -121,17 +135,19 @@ function alltests() {
done
popd >/dev/null
let "i += 1"
done
done; }
test_number=$(($test_number + 1))
# checking for unsecure use of $$ as random source in shell scripts
notify.note " * ${NOTE}"$"\
checking for unsecure use of \`\$\$' in shell and perl scripts""${NORM}..."
test.skip $test_number || {
notify.note "$(test.num2str). ${NOTE}"\
$"checking for unsecure use of \`\$\$' in shell and perl scripts""${NORM}..."
vulnerable=0
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
@ -162,9 +178,11 @@ ${NOTE}"$"Hint for bash scripts (\`mktemp' required)"":${NORM}
${NOTE}"$"Hint for perl scripts"":${NORM}
use File::Temp qw/ tempfile /;
(\$fh,\$file) = tempfile ('<script_name>.XXXXXX');
-----------------------------"
-----------------------------"; }
test_number=$(($test_number + 1))
notify.note "\
--> ${NOTE}"$"Security checks: ${#rpmpkg_name[@]} \
package(s) checked: ${WARN}$total_issues${NOTE} warning(s).""${NORM}"
notify.note "
--> "$"${NOTE}Security checks: ${#rpmpkg_name[@]} \
package(s) checked: ${NORM}${WARN}$total_issues${NORM}${NOTE} warning(s).${NORM}""
"
}

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\""