Compare commits

...

147 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
49 changed files with 1420 additions and 736 deletions

109
ChangeLog
View File

@ -1,5 +1,58 @@
Changes in version 1.16.5
Fri Aug 15 2014 Madrisan <davide.madrisan(a)gmail.com>
Changes in version 1.16.8
--- --- -- 2020 Silvan Calarco <silvan.calarco(a)mambasoft.it>
+ improvement
* dnf install support in default configuration
-------------------------------------------------------------------------------
Changes in version 1.16.7
--- --- -- 2016 Madrisan <davide.madrisan(a)gmail.com>
+ improvement
* templates/kde5 - Silvan Calarco
(Not very recent) updates to template.
* conf/04-rpmbuild-format-unpackaged-filelist.conf - Silvan Calarco
moving KDE4 icons to /usr/share/icons to share them with KF5.
* conf/03-apse.conf - Silvan Calarco
use a mirror for distrowatch or they will ban your IP.
* templates/python - Davide Madrisan
Add the rpm macros required for building both Python2 and Python3 packages
with a single specfile.
+ bugfix
* lib/libnetwork.lib - Silvan Calarco
Support for git repositories which don't have '.git' in their url.
-------------------------------------------------------------------------------
Changes in version 1.16.6
Thu May 07 2015 Madrisan <davide.madrisan(a)gmail.com>
+ improvement
* lib/libspec.lib - Davide Madrisan
Accept the rpm token %global which defines macros in global context.
* templates/ghc - Davide Madrisan
Improve the template and fix some indentation issues.
* conf/color-theme.web - Silvan Calarco
Make error text bolder to be more readable on red background
* templates/kde5, plugins/{spec-create,pck-update} - Davide Madrisan
Add a basic support for the KDE Framework 5 packages.
+ bugfix
* plugins/pck-update
Stricter checks on buildreqs with explicit arch.
-------------------------------------------------------------------------------
Changes in version 1.16.5 - "End-of-year" release
Tue Dec 30 2014 Madrisan <davide.madrisan(a)gmail.com>
+ improvement
* templates/ghc - Silvan Calarco
@ -35,6 +88,40 @@ Fri Aug 15 2014 Madrisan <davide.madrisan(a)gmail.com>
The translation rules for Python 2.7 and Python 3 have been updated
to reflect the current support for Python in openmamba.
+ improvement
* spec-create - Davide Madrisan
Create a correct %build block in the specfile generated from tarballs
that do not provide any 'configure' script but only an 'autogen,sh' one.
Feature asked by Silvan Calarco.
* spec-create - Davide Madrisan
specfile.create(): always execute 'git.create_tarball()' with the option
'--pck-version'. This way a user-provided package version will be used
instead of the default one.
Feature asked by Silvan Calarco.
* lib/libnetwork.lib - Davide Madrisan
git.download(): document and honour the '--pck-version' when set.
+ bugfix
* pkg-update - Silvan Calarco
'--target' needs to be passed as last option to rpmbuild.
+ improvement
* pck-update - Silvan Calarco
Support for package.arch specfile build requirement.
When this form of requirement is detected it is converted to package@arch
as required by smart.
Also add comments and a FIXME about a problem with previous patch of this
+ bugfix
* tests/{test01_pkgquality,test02_pkgsecurity} - Davide Madrisan
Fix an obsolete and now unsupported syntax for 'find -perm'.
+ improvement
* lib/libnetwork.lib - Davide Madrisan
Do not use the external tool 'which'. Use the bash builtin command 'type'.
-------------------------------------------------------------------------------
Changes in version 1.16.4 - "Korbielow" release
@ -117,7 +204,23 @@ Fri Nov 08 2013 Madrisan <davide.madrisan(a)gmail.com>
and '--packager-email' options.
+ bugfix
* pck-update - Davide Madrisan:
* pck_update - Silvan Calarco
More changes on 'rpmbuildopt' parameters ordering to workaround cross-arch
builds. This is still a workaround to allow cross-arch builds with long rpm
command lines because it seems that rpmbuild is ignoring extra passed
parameters when they exceed a certain number (5 or 6 as far as I remember).
* pck-update - Silvan Calarco
'buildreqs_to_install': keep conservative classic behaviour on archs
different from x86_64.
* pck-update - Silvan Calarco
Fix duplicated names in 'BuildRequires' in multiarch systems (x86_64).
* pck-update - Davide Madrisan
Always rebuild srpm when rpms are built unless --nosrpm is passed.
* pck-update - Davide Madrisan
Fix the way 'package.generate_name()' return the package path.
Bug reported by Silvan Calarco.

View File

@ -150,14 +150,6 @@ uninstall:
done
dist: clean
@for f in ChangeLog NEWS; do\
case `sed 15q $$f` in \
*"$(VERSION)"*) : ;; \
*) \
echo "$$f not updated; not releasing" 1>&2;\
exit 1;; \
esac; \
done
@rm -f history/$(dist_archive)
@$(INSTALL_DIR) history
@echo "Creating a temporary copy of the entire repository..."
@ -178,27 +170,10 @@ dist: clean
popd >/dev/null;\
rm -fr $$tmpdir
dist-rpm: dist $(PACKAGE).spec
@rpm_name=$(PACKAGE)-$(VERSION)-$(RELEASE);\
rpm_sourcedir=`rpm --eval=%{_sourcedir} 2>/dev/null`;\
rpm_specdir=`rpm --eval=%{_specdir} 2>/dev/null`;\
for d in $$rpm_sourcedir $$rpm_specdir; do\
[ -d "$$d" ] || \
{ echo "not found: $$d" 1>&2; exit 1; };\
done;\
echo "Copying $(dist_archive) to $$rpm_sourcedir...";\
(cp -p history/$(dist_archive) $$rpm_sourcedir &&\
mv -f $(PACKAGE).spec $$rpm_specdir &&\
echo "Creating rpm and srpm packages..." &&\
rpmbuild --clean -ba $$rpm_specdir/$(PACKAGE).spec) || exit 1
@echo "All done. Enjoy using $(PACKAGE)..."
dist-rpm-install: dist-rpm
@echo "Installing rpm packages..."
@rpm_pckdir=`rpm --eval=%{_rpmdir} 2>/dev/null`;\
sudo rpm -hUv --force\
$$rpm_pckdir/noarch/$(PACKAGE)-*${VERSION}-${RELEASE}.noarch.rpm\
|| exit 1
dist-rpm: dist
@rpm_sourcedir=`rpm --eval=%{_sourcedir}`;\
mv -f history/$(dist_archive) $$rpm_sourcedir;\
echo "and saved as \`$$rpm_sourcedir/$(dist_archive)'"
clean: mostlyclean
rm -f history/$(dist_archive)
@ -217,4 +192,3 @@ mostlyclean:
$(MAKE) clean -C po/$$loc || exit 1;\
done
@rm -f po/*.pot

66
NEWS
View File

@ -1,4 +1,49 @@
List of user visible changes in the release 1.16.5
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
@ -9,6 +54,21 @@ List of user visible changes in the release 1.16.5
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
@ -30,6 +90,10 @@ List of user visible changes in the release 1.16.5
* 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

77
README.md Normal file
View File

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

View File

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

View File

@ -36,7 +36,8 @@ let "print_version = 0"
function autospec.version() {
echo "\
${me[0]} ${me[1]}
Copyright (C) 2004-2013 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() {

View File

@ -20,10 +20,6 @@ Requires(pre): rpm
Requires: cpio, coreutils, curl, findutils, grep, sed
Requires: /bin/mktemp
Requires: /usr/bin/getopt
%if "%{stage1}" != "1"
# host (and 'bind-utils') is not available in early stage platform development
Requires: /usr/bin/host
%endif
Requires: bzip2
Requires: gzip
Requires: unzip
@ -175,6 +171,36 @@ 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

View File

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

View File

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

View File

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

View File

@ -90,6 +90,7 @@ System/Libraries/OCaml
System/Libraries/Perl
System/Libraries/PHP
System/Libraries/Python
System/Libraries/Ruby
System/Management
System/Multimedia
System/Servers

View File

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

View File

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

View File

@ -1,54 +1,91 @@
## unpackaged file list conversion --------------------------------------------
## conversion rules for unpackaged files
format_unpackaged_file_list_common="\
# python
s,^/usr/include/python3.3m,%{python3_inc},
# 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},
# kde4
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},"
"
## lines which are (target) architecture specific
## 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.3/site-packages,%{python3_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},
@ -59,13 +96,40 @@ 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.3/site-packages,%{python3_sitearch},
s,^/usr/lib64/python3.11/site-packages,%{python3_sitearch},
s,^/usr/lib/python3.11/site-packages,%{python3_sitelib},
s,^/usr/lib64/python3.7/site-packages,%{python37_sitearch},
s,^/usr/lib/python3.7/site-packages,%{python37_sitelib},
s,^/usr/lib64/python3.9/site-packages,%{python39_sitearch},
s,^/usr/lib/python3.9/site-packages,%{python39_sitelib},
s,^/usr/lib64/python3.10/site-packages,%{python310_sitearch},
s,^/usr/lib/python3.10/site-packages,%{python310_sitelib},
s,^/usr/lib64/python3.12/site-packages,%{python312_sitearch},
s,^/usr/lib/python3.12/site-packages,%{python312_sitelib},
# pam
s,^/usr/lib64/security,%{_pam_moduledir},
# libraries
s,^/usr/libexec64,%{_libexecdir},
s,^/usr/libexec,%{_prefix}/libexec,
s,^/usr/lib64,%{_libdir},
s,^/usr/lib,%{_prefix}/lib,
s,^/lib64,/%{_lib},"
### aarch64
format_unpackaged_file_list_aarch64="$format_unpackaged_file_list_x86_64"

View File

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

View File

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

View File

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

View File

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

View File

@ -1,7 +1,7 @@
#!/bin/bash
# libapse.lib -- Autospec Package Search Engine library
# Copyright (C) 2007,2012 Stefano Cotta Ramusino <stefano.cotta@openmamba.org>
# Copyright (C) 2008-2011 Silvan Calarco <silvan.calarco@mambasoft.it>
# Copyright (C) 2008-2024 Silvan Calarco <silvan.calarco@mambasoft.it>
[ "$libapse_is_loaded" = 1 ] || {
libapse_is_loaded=1
@ -307,7 +307,7 @@ proxy:,proxy-user:,autoupdate-off: \
# 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
@ -321,6 +321,8 @@ proxy:,proxy-user:,autoupdate-off: \
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"
@ -343,9 +345,9 @@ ${proxy:+ --proxy $proxy}${proxy_user:+ --proxy-user $proxy_user}"
<${NOTE}$curr_curl_url${NORM}> (\`${NOTE}source0${NORM}')..."
notify.debug "\
running: curl \$curr_curl_proxy_opts -s -L \"$curr_curl_url\""
running: curl $curr_curl_proxy_opts $curr_curl_user_agent_opts -s -L \"$curr_curl_url\""
curl $curl_opts_netlink \
$curr_curl_proxy_opts -s -L "$curr_curl_url" \
$curr_curl_proxy_opts $curr_curl_user_agent_opts -s -L "$curr_curl_url" \
> $fcurlout
let "retval = $?"
@ -446,8 +448,8 @@ sort -t. -n -r -k1 -k2 -k3 -k4 -k5 -k6 -k7 -k8 -k9 -k10 ))
curr_curl_url="http://sourceforge.net/projects/$src_name/files/latest/download"
notify.debug \
"running: curl \$curr_curl_proxy_opts -s -L \"$curr_curl_url\""
curl $curr_curl_proxy_opts -I -A Linux -s -L "$curr_curl_url" \
"running: curl $curr_curl_proxy_opts $curr_curl_user_agent_opts -s -L \"$curr_curl_url\""
curl $curr_curl_proxy_opts $curr_curl_user_agent_opts -I -A Linux -s -L "$curr_curl_url" \
> $fcurlout
let "retval = $?"
@ -497,21 +499,21 @@ sed -n "s,Location: \(.*\)?.*,\1,pi"`
$"looking at"" ${NOTE}(#$i)${NORM} <${NOTE}${apse_site_name[$i]}${NORM}>..."
for search_name in $src_name $specname; do
[ "${apse_put_fields[$i]}" ] &&
curr_curl_url="${apse_uri[$i]}" ||
curr_curl_url="${apse_uri[$i]}${search_name}"
[ "${apse_put_fields[$i]}" ] && curr_curl_url="${apse_uri[$i]}" || {
curr_curl_url="$(echo "${apse_uri[$i]}" | sed -e "s,\${search_name},\L${search_name},g")"
[ "${curr_curl_url}" = "${apse_uri[$i]}" ] && curr_curl_url="${apse_uri[$i]}${search_name}"
}
if [ "${apse_put_fields[$i]}" ]; then
notify.debug "\
running: curl \$curr_curl_proxy_opts -s -L -d \
running: curl $curr_curl_proxy_opts $curr_curl_user_agent_opts -s -L -d \
\"${apse_put_fields[$i]}${search_name}\" \"$curr_curl_url\""
curl $curr_curl_proxy_opts -s -L -d \
curl $curr_curl_proxy_opts $curr_curl_user_agent_opts -s -L -d \
"${apse_put_fields[$i]}${search_name}" "$curr_curl_url" \
> $fcurlout
else
notify.debug "\
running: curl \$curr_curl_proxy_opts -s -L \"$curr_curl_url\""
curl $curr_curl_proxy_opts -s -L "$curr_curl_url" > $fcurlout
running: curl $curr_curl_proxy_opts $curr_curl_user_agent_opts -s -L \"$curr_curl_url\""
curl $curr_curl_proxy_opts $curr_curl_user_agent_opts -s -L "$curr_curl_url" > $fcurlout
fi
let "retval = $?"
@ -535,6 +537,13 @@ $(echo "${apse_grep[$i]}" | sed -e "s,\${search_name},${search_name},g")"
running: grep -i -m1 \"$current_grep\" \$fcurlout | sed -n \"$current_sed\""
new_version="$(\
grep -i -m1 "$current_grep" $fcurlout | sed -n "$current_sed")"
elif [ "${apse_jq[$i]}" ]; then
current_jq="\
$(echo "${apse_jq[$i]}" | sed -e "s,\${search_name},\L${search_name},g")"
notify.debug "\
running: jq \"$current_jq\" \$fcurlout"
new_version="$(\
jq -r "$current_jq" $fcurlout)"
else
notify.debug "\
running: sed -n \"$current_sed\" \$fcurlout"
@ -565,7 +574,7 @@ apse.cmpversion \"$last_version\" \"$new_version\""
unset APSE_LAST_VERSION
if [ "$last_version" ]; then
APSE_LAST_VERSION="${last_version/-/.}"
APSE_LAST_VERSION="${last_version/-*}"
notify.note $"\
last version of \`${NOTE}$specname${NORM}' found:"" \
\`${NOTE}${APSE_LAST_VERSION}${NORM}'"

View File

@ -1,6 +1,6 @@
#!/bin/bash
# libnetwork.lib -- @package@ library to get info from internet repositories
# Copyright (C) 2008,2010,2012 Davide Madrisan <davide.madrisan@gmail.com>
# Copyright (C) 2008,2010,2012,2014 Davide Madrisan <davide.madrisan@gmail.com>
[ "$libnetwork_is_loaded" = 1 ] || {
libnetwork_is_loaded=1
@ -23,29 +23,10 @@ libnetwork.lib: "$"library not found"": @libdir@/libtranslate.lib" 1>&2
notify.debug $"loading"": \`libnetwork.lib'..."
# check if all the needed tools are available
# note: 'host' has been removed from this list because the package
# bind-utils is not available in early stage platform development
for tool in curl mktemp; do
[ "$(type -p curl)" ] || notify.error $"utility not found"": \`curl'"
done
# function repository.is_reachable()
# check if the server '$1' is reachable (test = DNS lookup query)
# args:
# $1 : server name
function repository.is_reachable() {
local ftpserver="${1/[a-z]*\:\/\//}"
[ "$ftpserver" ] || notify.error $"\
(bug)"" -- $FUNCNAME: "$"missing mandatory arg"" (#1)"
if [ "$(type -p host)" ]; then
host -W3 $ftpserver >&/dev/null
else
notify.warning $"utility not found"": \`host'"
fi
return $?
}
# function repository.get_srpm_pckname_from_site()
# get the list of SRPM packages by looking at the curl dump of the
# ftp or html site
@ -98,7 +79,7 @@ function repository.get_srpm_pckname_from_site() {
notify.debug "$FUNCNAME: infile = \"$infile\""
local regexpr
[[ "$pck_name" =~ ^[a-zA-Z0-9_-]+$ ]] && \
[[ "$pck_name" =~ ^[+a-zA-Z0-9_-]+$ ]] && \
regexpr="^$pck_name-[^-]\+-[^-]\+$" || regexpr="$pck_name"
notify.debug "$FUNCNAME: regexpr = \"$regexpr\""
@ -107,6 +88,7 @@ function repository.get_srpm_pckname_from_site() {
local pckname_from_HTML=($(sed -n "\
# remove HTML tags --> get a better input
/<[aA]\+ [hH]\+[rR]\+[eE]\+[fF]\+=\".*\.src\.rpm\"/{
s|%2B|+|g;
s|.*<[aA]\+ [hH]\+[rR]\+[eE]\+[fF]\+=\"\([^\"]*\)\".*|\1|
{/$regexpr/Ip}}" $infile))
echo "${pckname_from_HTML[*]}"
@ -233,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"
@ -250,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" ;;
@ -281,7 +263,7 @@ getting list of files from"" \`${NOTE}$currurl/${NORM}'..."
got_SPEC_FILENAME=($(\
repository.get_srpm_pckname_from_site --ftp "$pck_name" "${flist[$i]}"))
;;
http://*)
http://*|https://*)
got_SPEC_FILENAME=($(\
repository.get_srpm_pckname_from_site --html "$pck_name" "${flist[$i]}"))
;;
@ -383,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
@ -442,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
@ -789,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" \
@ -798,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 $"\
@ -827,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)"
@ -852,6 +855,7 @@ curl $options --user \"***:***\" --quote \"DELE $deletefile\" $1"
# -d, --destdir : target directory
# -p, --proxy : proxy server
# -u, --proxy-user : proxy user
# --preserve-dot-git : do not remove .git files
# $@ : git repository
#
# return value:
@ -860,14 +864,15 @@ curl $options --user \"***:***\" --quote \"DELE $deletefile\" $1"
function git.download() {
local ARGS
ARGS=`LC_ALL=C getopt \
-o d:v:p:u: \
--long destdir:,pck-version:,proxy:,proxy-user: \
-o d:v:p:u:k \
--long destdir:,pck-version:,proxy:,proxy-user:,preserve-dot-git: \
-n "$FUNCNAME" -- "$@"`
[ $? = 0 ] || notify.error $"(bug)"" -- $FUNCNAME: "$"\`getopt' error"
local destdir
local proxy proxy_user
local pck_version
local preserve_dot_git=0
eval set -- "$ARGS"
while :; do
@ -888,6 +893,10 @@ function git.download() {
proxy_user="$2"; shift
notify.debug "$FUNCNAME: proxy_user = \"$proxy_user\""
;;
--preserve-dot-git)
preserve_dot_git="$2"; shift
notify.debug "$FUNCNAME: preserve_dot_git = \"$preserve_dot_git\""
;;
--) shift; break;;
*) notify.error $"\
(bug)"" -- $FUNCNAME: "$"\`getopt' error: bad command \`$1'" ;;
@ -909,21 +918,33 @@ function git.download() {
notify.debug "$FUNCNAME: token_dirname = \"$token_dirname\""
notify.debug "$FUNCNAME: token_basename = \"$token_basename\""
local git_branch="${token_dirname/*.git\/}"
if [ -e $destdir/$token_basename ]; then
if [ "$force_download" = "0" ]; then
notify.note "[${filenum:-*}] $NOTE$token_basename$NORM ... "$"skipped"
return 0
fi
fi
local git_branch="${token_dirname/*\/}"
notify.debug "$FUNCNAME: git_branch = \"$git_branch\""
git.create_tarball \
--pck-version "$pck_version" \
--destdir "$destdir" \
--preserve-dot-git "0" --git-branch "$git_branch" \
"${token_dirname/.git*}.git"
--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
@ -946,6 +967,7 @@ function git.create_tarball() {
# see: http://bardofschool.blogspot.fr/2008/11/use-git-behind-proxy.html
local proxy proxy_user
local git_branch
local git_commit
local preserve_dot_git=0
local pck_version
@ -961,8 +983,18 @@ function git.create_tarball() {
notify.debug "$FUNCNAME: pck_version = \"$pck_version\""
;;
--git-branch)
git_branch="$2"; shift
git_branch="`git.urldecode "$2"`"; shift
if [ "${git_branch/@*}" != "${git_branch}" ]; then
git_commit="${git_branch/*@}"
git_branch="${git_branch/@*}"
if [ ! "${git_commit}" ]; then
notify.error "$FUNCNAME: cannot checkout empty commit"
fi
fi
notify.debug "$FUNCNAME: git_branch = \"$git_branch\""
if [ "${git_commit}" ]; then
notify.debug "$FUNCNAME: git_commit = \"$git_commit\""
fi
;;
--preserve-dot-git)
preserve_dot_git="$2"; shift
@ -991,20 +1023,10 @@ function git.create_tarball() {
[ "$destdir" ] || notify.error $"\
(bug)"" -- $FUNCNAME: "$"missing mandatory arg"" (--destdir)"
local today="$(date "+%Y%m%d")"
if [ "$pck_version" ]; then
[ "$pck_version" = "${today}git" ] || notify.warning "\
${NOTE}${pck_version}${NORM}: "$"\
not the expected package version"" (${NOTE}${today}git${NORM})..."
else
pck_version="${today}git"
notify.debug "$FUNCNAME: pck_version = \"$pck_version\""
fi
which git &>/dev/null ||
type -p git &>/dev/null ||
notify.error $"utility not found"": \`git'"
local tmpgitdir=$(mktemp -q -d -t tmpgit.XXXXXXXX)
local tmpgitdir=$(mktemp -q -d -p /var/tmp -t tmpgit.XXXXXXXX)
[ $? -eq 0 ] ||
notify.error $"can't create temporary files"
notify.debug "$FUNCNAME: tmpgitdir = $tmpgitdir"
@ -1015,12 +1037,12 @@ not the expected package version"" (${NOTE}${today}git${NORM})..."
notify.note \
"${NOTE}"$"cloning git repository""\
<$git_repository> ${git_branch:+($git_branch)}${NORM}""..."
if [ "$preserve_dot_git" = "0" -a "${git_repository:0:4}" != "http" ]; then
notify.debug "$FUNCNAME: git clone --depth=1 ${git_branch:+-b $git_branch} \"$git_repository\""
git clone --depth=1 ${git_branch:+-b $git_branch} "$git_repository"
if [ "$preserve_dot_git" = "0" -a "${git_repository:0:4}" != "http" -a ! "${git_commit}" ]; then
notify.debug "$FUNCNAME: git clone --recursive --depth=1 ${git_branch:+-b $git_branch} \"$git_repository\""
git clone --recursive --depth=1 ${git_branch:+-b $git_branch} "$git_repository"
else
notify.debug "$FUNCNAME: git clone ${git_branch:+-b $git_branch} \"$git_repository\""
git clone ${git_branch:+-b $git_branch} "$git_repository"
notify.debug "$FUNCNAME: git clone --recursive ${git_branch:+-b $git_branch} \"$git_repository\""
git clone --recursive ${git_branch:+-b $git_branch} "$git_repository"
fi
[ $? -eq 0 ] ||
{ popd &>/dev/null
@ -1029,6 +1051,16 @@ not the expected package version"" (${NOTE}${today}git${NORM})..."
pck_tarball="$(find -mindepth 1 -maxdepth 1 -type d -printf "%f")"
if [ "${git_commit}" ]; then
cd ${pck_tarball}
git checkout ${git_commit} || {
popd &>/dev/null
rm -fr $tmpgitdir
notify.error $"cannot checkout the specified tag";
}
cd ..
fi
if [ "$preserve_dot_git" = "0" ]; then
# remove git files
rm -fr $pck_tarball/.git

View File

@ -294,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"
@ -319,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|" )"
@ -632,17 +632,26 @@ $FUNCNAME: specfile_preprocessed = \"$specfile_preprocessed\""
shift
done
local tmpspreprerr=$(mktemp -q -t $me.XXXXXXXX)
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}'"
notify.debug "\
if [ "${rpm_version:0:2}" == "5." ]; then
notify.debug "\
$FUNCNAME: running: rpm -q $rpm_options --specfile --specedit $specfile ..."
eval "\
eval "\
rpm -q $rpm_options --specfile --specedit $specfile \
> $specfile_preprocessed 2> $tmpspreprerr"
> $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 $"\
@ -1123,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)

View File

@ -24,7 +24,7 @@
\fBlibtest.lib\fR - libreria con le funzioni del framework di test.
.SH VERSIONE
Questo documento e' aggiornato alla versione 1.16.4 di
Questo documento e' aggiornato alla versione 1.16.5 di
.B @package@.
.SH DESCRIZIONE
@ -48,8 +48,8 @@ esterni ma piuttosto come ulteriore modularizzazione del codice.
.B @package@
e' stato utilizzato con successo dagli sviluppatori della distribuzione
.B QiLinux
(\fIhttp://www.qilinux.org\fP), permettendo la creazione di specfile standard e
.B openmamba
(\fIhttps://openmamba.org\fP), permettendo la creazione di specfile standard e
l'aggiornamento (semi)automatico dei pacchetti.
E' utilizzato attualmente nello sviluppo di
.B openmamba GNU/Linux
@ -88,7 +88,7 @@ ftp_rw_user[1]="<user>"
.TP
ftp_rw_passwd[1]="<passwd>"
.TP
arch_list=(i586 ppc arm x86_64)
arch_list=(i586 arm x86_64 aarch64)
.TP
curl_opts_netlink="--connect-timeout 15 --retry 3 --limit-rate 250k"
.PD
@ -200,9 +200,7 @@ 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
@ -546,7 +544,7 @@ cioe' eseguendo:
\fBLC_ALL=C autospec\fR ...
.SH COPYRIGHT
Copyright (C) 2004\-2012 Davide Madrisan <davide.madrisan@gmail.com>
Copyright (C) 2004\-2014 Davide Madrisan <davide.madrisan@gmail.com>
.br
.br
Questo e' software libero. E' possibile redistribuirlo e/o modificarlo nei termini

View File

@ -66,6 +66,7 @@ function usage() {
"$"Samples"":
@frontend@ -q -C ${default_cfg_list[0]} --eval=\"logging_dir\"
@frontend@ --eval rpm_allowed_groups
@frontend@ --eval rpm_approved_licenses
"$"Report bugs to <davide.madrisan@gmail.com>."

View File

@ -1,6 +1,7 @@
#!/bin/bash
# pck-extract -- plugin for @package@
# Copyright (C) 2004-2010 Davide Madrisan <davide.madrisan@gmail.com>
# Copyright (C) 2024 Silvan Calarco <silvan.calarco@mambasoft.it>
[ -z "$BASH" ] || [ ${BASH_VERSION:0:1} -lt 3 ] &&
{ echo $"this script requires bash version 3 or better" >&2 && exit 1; }
@ -173,16 +174,16 @@ notify.enable_colors "$color_scheme"
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
@ -193,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"
@ -212,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
@ -261,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}"
@ -271,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}"
@ -283,8 +275,8 @@ for f in $tmpcpiodir/${filelst:-*}; do
;;
esac
[ $? -eq 0 ] ||
{ rm -fr $tmpcpiodir
{ rm -fr $tmparchivedir
notify.error $"can't save files to \`$destdir'"; }
done
rm -fr $tmpcpiodir
rm -fr $tmparchivedir

View File

@ -1,6 +1,6 @@
#!/bin/bash
# pck-update -- plugin for @package@
# Copyright (C) 2004-2014 Davide Madrisan <davide.madrisan@gmail.com>
# Copyright (C) 2004-2015 Davide Madrisan <davide.madrisan@gmail.com>
[ -z "$BASH" ] || [ ${BASH_VERSION:0:1} -lt 3 ] &&
{ echo $"this script requires bash version 3 or better" >&2 && exit 1; }
@ -34,6 +34,7 @@ me=(${0##*/} "@version@" "@date@")
# output verbosity
let "verbose = 1"
#
let "noprep = 0"
let "cleanup = 0"
let "spec_format = 0"
let "rebuild = 0"
@ -97,7 +98,7 @@ function usage() {
[--packager-email \"email@domain\" ] [--nosrpm|--norpm] \\
[--force-update] [--force-build] [--force-install] \\
[--force-download] [--ignore-test t1[,t2,...]] \\
[-c] [-f] [-L] [-R] [-C <conf_file>]
[-p] [-c] [-f] [-L] [-R] [-C <conf_file>]
"$"where the above options mean"":
-u, --update "$"Update the package <pck> to version <ver> and release <rel>""
@ -138,6 +139,8 @@ function usage() {
"$"Override packager full name""
--packager-email
"$"Override packager email""
--distro-rpm
"$"Override release append tag (predefined: $DISTRO_rpm)""
--nosrpm "$"action"" 5: "$"Only build the rpm packages""
"$"action"" 10: "$"Do not upload the srpm package""
--norpm "$"action"" 5: "$"Only build the srpm package""
@ -145,6 +148,7 @@ function usage() {
--list-check "$"action"" 5: "$"Do a \`list check'""
-b, --update-autobuildreq""
"$"action"" 6: "$"Replace the block AUTOBUILDREQ""
-p, --noprep "$"Skip rpmbuild %prep macro when retrying building from an existing builddir""
-c, --clear "$"Remove all the temporary files except (s)rpm packages""
-f, --format "$"Enable specfile autoformatting""
-L, --log "$"Unable logging to file (logging dir: \`\$logging_dir')""
@ -194,14 +198,14 @@ for arg in $@; do
done
exec_options=`LC_ALL=C getopt \
-o ua:d:l:S:A:bcfLRC:DqhV \
-o ua:d:l:S:A:pbcfLRC:DqhV \
--long \
update,action:,define:,login:,specfile:,arch:,\
server-download:,server-upload:,server:,\
changelog:,packager-fullname:,packager-email:,\
changelog:,packager-fullname:,packager-email:,distro-rpm:,\
nosrpm,norpm,list-check,update-autobuildreq,\
force-update,force-build,force-install,force-download,force,\
ignore-test:,clear,format,log,rebuild,root:,\
ignore-test:,noprep,clear,format,log,rebuild,root:,\
frontend_opts:,colors:,config:,\
debug,quiet,help,version \
-n "$me" -- "$@"`
@ -252,6 +256,9 @@ while :; do
--packager-email)
packager_email="$2"; shift
cmdline_vars[${#cmdline_vars[*]}]="packager_email=\"$packager_email\"" ;;
--distro-rpm)
DISTRO_rpm="$2"; shift
cmdline_vars[${#cmdline_vars[*]}]="DISTRO_rpm=\"$DISTRO_rpm\"" ;;
--nosrpm)
let "nosrpm = 1" ;;
--norpm)
@ -276,6 +283,8 @@ while :; do
let "force_upload = 1" ;;
--ignore-test)
ignore_test_list=$2; shift ;;
-p|--noprep)
noprep=1 ;;
-c|--clear)
cleanup=1 ;;
-f|--format)
@ -402,11 +411,11 @@ $"illegal value"": \"$ftp_rw_server_num_default\""
# display users and passwords in the debug messages (default: '0')
debug_print_private_user_infos=0
infofile=$(mktemp -q -t infofile.XXXXXXXX)
infofile=$(mktemp -q -p /var/tmp -t infofile.XXXXXXXX)
[ $? -eq 0 ] || notify.error $"can't create temporary files"
# preprocessed specfile generated by 'rpm --specfile --specedit'
specfile_preprocessed=$(mktemp -q -t specpreproc.XXXXXXXX)
specfile_preprocessed=$(mktemp -q -p /var/tmp -t specpreproc.XXXXXXXX)
[ $? -eq 0 ] || notify.error $"can't create temporary files"
trap "rm -f $infofile $specfile_preprocessed" 0 1 2 3 6 7 9 13 15
@ -539,9 +548,9 @@ done)"
[ "$SPEC_PATCH" ] || specfile.getvars -s $SPECFILE_PREPROCESSED SPEC_PATCH
[ "$SPEC_SOURCE" ] || specfile.getvars -s $SPECFILE_PREPROCESSED SPEC_SOURCE
[ "$SPEC_LICENSE" ] || specfile.getvars -s $SPECFILE_PREPROCESSED SPEC_LICENSE
[ "$SPEC_BUILDARCH" ] || specfile.getvars -s $SPECFILE_PREPROCESSED SPEC_BUILDARCH
[ "$SPEC_TARGET" ] || specfile.getvars -s $SPECFILE_PREPROCESSED SPEC_TARGET
[ "$SPEC_OBSOLETES" ] || specfile.getvars -s $SPECFILE_PREPROCESSED SPEC_OBSOLETES
[ "$SPEC_BUILDARCH" ] || specfile.getvars -s $SPECFILE_PREPROCESSED SPEC_BUILDARCH
[ "$SPEC_BUILDREQUIRES" ] || specfile.getvars -s $SPECFILE_PREPROCESSED SPEC_BUILDREQUIRES
[ "$SPEC_BUILDROOT" ] || specfile.getvars -s $SPECFILE_PREPROCESSED SPEC_BUILDROOT
@ -1204,10 +1213,20 @@ rpmvars.solve "$fullURL_new" "$SRPM_SPECFILE_WITH_PATH")
notify.debug "fullURL_new = $fullURL_new"
case "$fullURL_new" in
http+git://*|https+git://*)
fullURL_new="${fullURL_new/+git}"
[ -e "${source_dir}/${fullURL/*\/}" -a "$force_download" != "1" ] || \
git.download \
--pck-version "$pck_newver" \
--destdir="$source_dir" "$fullURL_new" \
--preserve-dot-git 1
;;
git://*|http://*.git/*|https://*.git/*)
git.download \
--pck-version "$pck_newver" \
--destdir="$source_dir" "$fullURL_new"
fullURL_new="${fullURL_new/+git}"
[ -e "${source_dir}/${fullURL/*\/}" -a "$force_download" != "1" ] || \
git.download \
--pck-version "$pck_newver" \
--destdir="$source_dir" "$fullURL_new"
;;
*) curl.download --options "$curl_options" $sdflag \
${proxy:+--proxy $proxy} ${proxy_user:+--proxy-user $proxy_user} \
@ -1326,7 +1345,7 @@ illegal \`format_extra_rules' (see configuration file(s))"
local sharedstatedir=`rpm --eval=%{_sharedstatedir}`
local sysconfdir=`rpm --eval=%{_sysconfdir}`
local tmpspec=$(mktemp -q -t $me.XXXXXXXX)
local tmpspec=$(mktemp -q -p /var/tmp -t $me.XXXXXXXX)
[ $? -eq 0 ] ||
notify.error $"can't create temporary files"
notify.debug "tmpspec = \`${NOTE}$tmpspec${NORM}'"
@ -1463,7 +1482,7 @@ for i in $(seq 1 1 ${#spec_lines[@]}); do
echo -n "\n ${spec_lines[$i-1]}"
done)"
local tmppreamble=$(mktemp -q -t $me.XXXXXXXX)
local tmppreamble=$(mktemp -q -p /var/tmp -t $me.XXXXXXXX)
[ $? -eq 0 ] ||
notify.error $"can't create temporary files"
notify.debug "tmppreamble = \`${NOTE}$tmppreamble${NORM}'"
@ -1924,7 +1943,7 @@ $([ -f "$filename" ] && echo "(found)" || echo "(not found)")"
notify.debug "\
filename = $filename ""\
$([ -f "$filename" ] && echo "(found)" || echo "(not found)")"
[ -f "$filename" ] && nosrpm=1 || nosrpm=0
[ -f "$filename" -a "$build_needed" = 0 ] && nosrpm=1
#if [ "$SRPM_SPECFILE_WITH_PATH" -nt "$filename" ]; then
# # rebuild the srpm package if the specfile has been modified
@ -1990,7 +2009,18 @@ build requirement found"": \`${NOTE}$f${NORM}' ""\
# remove duplicates
buildreqs_to_install=(
$(for f in ${buildreqs_to_install[@]}; do echo $f@$target_cpu; done | sort -u))
$(for f in ${buildreqs_to_install[@]}; do
if [ "${f/*.}" == "arm" -o "${f/*.}" == "x86_64" -o "${f/*.}" == "i586" ]; then
# if arch specified convert e.g. package.i586 to package@i586
echo ${f/./@}
elif [ "${BUILD_ARCH}" == "x86_64" -a "${target_cpu}" != "x86_64" ]; then
# x86_64: specifying arch is necessary (FIXME: problems with .noarch)
echo $f@${target_cpu}
else
# classic behaviour
echo $f
fi
done | sort -u))
# install missing build requirements
if [[ "${buildreqs_to_install[@]}" ]]; then
@ -2011,7 +2041,7 @@ installing missing build requirement"": \`${NOTE}$f${NORM}'"
else
$rpm_download_and_install ${buildreqs_to_install[*]}
fi
[ $? -eq 0 ] || notify.error $"\
[ $? -eq 0 ] || notify.warning $"\
cannot install the needed build requirements"
else
notify.error $"\
@ -2040,7 +2070,16 @@ rpmvars.solve "$fullURL" "$SRPM_SPECFILE_WITH_PATH")
notify.debug "fullURL = $fullURL"
case "$fullURL" in
http+git://*|https+git://*)
fullURL="${fullURL/+git}"
[ -e "${source_dir}/${fullURL/*\/}" -a "$force_download" != "1" ] || \
git.download \
--pck-version "$pck_rpmversion" \
--destdir="$source_dir" "$fullURL" \
--preserve-dot-git 1
;;
git://*|http://*.git/*|https://*.git/*)
fullURL="${fullURL/+git}"
[ -e "${source_dir}/${fullURL/*\/}" -a "$force_download" != "1" ] || \
git.download \
--pck-version "$pck_rpmversion" \
@ -2077,24 +2116,26 @@ ${proxy:+--proxy $proxy} ${proxy_user:+--proxy-user $proxy_user} \
--define=\"%_specdir $spec_dir\" \
--define=\"%_sourcedir $source_dir\" \
--define=\"%_builddir $build_dir\" \
--define=\"%_tmppath $tmppath_dir\""
--define=\"%_tmppath $tmppath_dir\" \
--define=\"%_buildrootdir $tmppath_dir\""
# [ "$rpm_rootdir" ] &&
# rpmbuild_opts="$rpmbuild_opts $rpm_root_opts"
# check if we are cross-compiling
[ "$BUILD_ARCH" != "$target_cpu" ] &&
rpmbuild_opts="--target $target_cpu $rpmbuild_opts"
USER_RPMDEFINE_OPTS="--target $target_cpu $USER_RPMDEFINE_OPTS"
[ "$noprep" = "1" ] && rpmbuild_opts="$rpmbuild_opts --noprep"
[ "$cleanup" = "1" ] && rpmbuild_opts="$rpmbuild_opts --clean"
# note: exit with error when build requirements are missing
notify.note "${NOTE}"$"testing out specfile""${NORM}..."
eval "rpmbuild --nobuild \
$rpmbuild_opts $rpm_root_opts $USER_RPMDEFINE_OPTS \
$USER_RPMDEFINE_OPTS $rpmbuild_opts $rpm_root_opts \
$SRPM_SPECFILE_WITH_PATH 2>&1" ||
notify.error $"rpmbuild exited with error code":" \`$?'"
notify.debug "define_list_name = (${define_list_name[*]})"
notify.debug "define_list_value = (${define_list_value[*]})"
@ -2138,18 +2179,18 @@ $SRPM_SPECFILE_WITH_PATH $USER_RPMDEFINE_OPTS 2>&1"
# as the dependencies check is done before, it is safe to pass
# --nodeps to non-simulated build commands.
eval "\
rpmbuild -bs $rpmbuild_opts --nodeps \
$SRPM_SPECFILE_WITH_PATH $USER_RPMDEFINE_OPTS 2>&1"
rpmbuild -bs $USER_RPMDEFINE_OPTS $rpmbuild_opts \
$SRPM_SPECFILE_WITH_PATH 2>&1"
elif [ "$nosrpm" = 1 ]; then
notify.note "${NOTE}"$"building the rpm packages""${NORM}..."
eval "\
rpmbuild -bb $rpmbuild_opts --nodeps \
$SRPM_SPECFILE_WITH_PATH $USER_RPMDEFINE_OPTS 2>&1"
rpmbuild -bb $USER_RPMDEFINE_OPTS $rpmbuild_opts \
$SRPM_SPECFILE_WITH_PATH 2>&1"
else
notify.note "${NOTE}"$"building rpm and srpm packages""${NORM}..."
eval "\
rpmbuild -ba $rpmbuild_opts --nodeps \
$SRPM_SPECFILE_WITH_PATH $USER_RPMDEFINE_OPTS 2>&1"
rpmbuild -ba $USER_RPMDEFINE_OPTS $rpmbuild_opts \
$SRPM_SPECFILE_WITH_PATH 2>&1"
fi
local rpmbuild_retcode="$?"
if [ $rpmbuild_retcode -eq 0 ]; then
@ -2158,7 +2199,7 @@ It seems good but do not forget to run quality and security tests"\
" (-a8)${NORM}""
"
else
local tmpunpackfiles=$(mktemp -q -t $me.XXXXXXXX)
local tmpunpackfiles=$(mktemp -q -p /var/tmp -t $me.XXXXXXXX)
[ $? -eq 0 ] || notify.error $"can't create temporary files"
notify.debug "tmpunpackfiles = \`${NOTE}$tmpunpackfiles${NORM}'"
@ -2168,6 +2209,8 @@ format_unpackaged_file_list_${target_cpu}"
[ -n "${!format_unpackaged_file_list_arch}" ] ||
notify.warning \
$"no arch-specific pattern translations for unpackaged files"
notify.debug "\
format_unpackaged_file_list_arch = $format_unpackaged_file_list_arch"
while read line; do
case "$line" in
@ -2179,8 +2222,7 @@ format_unpackaged_file_list_${target_cpu}"
done < <(LC_ALL=C eval rpmbuild -bl $rpmbuild_opts --nodeps --nobuild \
$SRPM_SPECFILE_WITH_PATH $USER_RPMDEFINE_OPTS 2>&1) | \
sed -e "$format_unpackaged_file_list_common;\
${!format_unpackaged_file_list_arch}" \
> $tmpunpackfiles
${!format_unpackaged_file_list_arch}" > $tmpunpackfiles
if [ -s "$tmpunpackfiles" ]; then
notify.error $"\
@ -2237,7 +2279,7 @@ build the list of the build requirements""${NORM}"
notify.debug "SPEC_TARGET = [ ${SPEC_TARGET[*]} ]"
notify.debug "pcks_list = [ ${pcks_list[*]} ]"
local frequires=$(mktemp -q -t frequires.XXXXXXXX) ||
local frequires=$(mktemp -q -p /var/tmp -t frequires.XXXXXXXX) ||
notify.error $"can't create temporary files"
# FIXME: "/usr/lib/perl5" should be defined in autospec.conf
local perl_prefixes=$(perl -V | grep "^[[:space:]]\+/usr/lib/perl5")
@ -2268,8 +2310,12 @@ build the list of the build requirements""${NORM}"
elif [ "${req:0:1}" = "/" ]; then
# file requirement; ignore
:
elif [ "${req:0:1}" = "(" ]; then
# rich requirement; add as it is
buildreq="$line"
elif [ "${req:0:7}" = "rpmlib(" -o \
"${req:0:7}" = "config(" -o \
"${req:0:5}" = "rtld(" -o \
"${req:0:11}" = "executable(" ]; then
# not a build requirement
:
@ -2283,18 +2329,27 @@ build the list of the build requirements""${NORM}"
sed "s|\(.*\)-[^-]*-[^-]*|\1|")
[ "$buildreq" ] && break
done
[ "$buildreq" ] ||
echo "# $req: perl requirement not resolved"
[ "$buildreq" ] || buildreq="$req"
elif [ "${req}" = "python(abi)" ]; then
# FIXME: libpython-devel should be defined in autospec.conf
# python requirement
buildreq="libpython-devel"
reqver=${line/*= /}
buildreq="libpython${reqver/\.}-devel"
rpm -q --qf %{name} --whatprovides "$buildreq" &>/dev/null || {
buildreq="libpython${reqver/\.*}-devel"
}
elif [[ "$req" =~ .*\.so\.[0-9]* ]]; then
solibpath_catch=""
# is a shared library
# req="libGL.so.1(libc6)" => /usr/lib/libGL.so
reqpath=$($path_ldconfig -Np | \
reqpaths=$($path_ldconfig -Np | \
sed -n "s, ,,g;/${req/(*)/}/{s,.*=>,,;p}")
reqpath=""
for l in $reqpath; do
[ "${reqpath}" = "" ] && reqpath=$l
# Prefer solib in libdir path in case of multiple choices
[ "`dirname $l`" = "${libdir}" ] && { reqpath=$l; break; }
done
solibpath="${reqpath/\.so\.*/.so}"
notify.debug "\
req=\"$req\" ($reqpath) =?> solibpath=\"$solibpath\""
@ -2327,16 +2382,29 @@ $(echo $solibpath | sed "s|-[0-9.]*\.so|.so|")"
fi
if [ "$solibpath_catch" ]; then
rpm --qf %{name} -qf $solibpath_catch &>/dev/null &&
buildreq="$(rpm --qf %{name} -qf $solibpath_catch)" ||
buildreq="$(rpm --qf "%{name}\n" -qf $solibpath_catch|head -n1)" ||
echo "\
#$req: $solibpath_catch: file not owned by any package"
else
echo "#$req: .so link not found"
if [ "${req:0:8}" != "ld-linux" -a "${req:0:13}" != "libpthread.so" ]; then
echo "#$req: .so link not found"
fi
fi
else
echo "\
#$req: library not reported by ldconfig; run \`ldconfig' and try again"
# Find installed package providing library using rpm
buildreq=
rpm -q --qf %{name} --whatprovides "$req" &>/dev/null &&
buildreq="$(rpm -q --qf "%{name}\n" --whatprovides "$req"|head -n1)" ||
echo "#$req: library not reported by ldconfig and not provided in any installed package"
# Find providing package -devel if present
if [ "${buildreq}" != "" ]; then
rpm -q --qf %{name} "${buildreq}-devel" &>/dev/null &&
buildreq="${buildreq}-devel"
fi
fi
elif [[ "$req" =~ .*python.*dist\(.*\).* ]]; then
# Python dist requirement
buildreq="$req"
elif [[ "$req" =~ .*\(.*\) || "$req" =~ .*\.so ]]; then
# a(b) requirement or *.so library
rpm -q --qf %{name} --whatprovides "$req" &>/dev/null &&
@ -2351,7 +2419,7 @@ $(echo $solibpath | sed "s|-[0-9.]*\.so|.so|")"
-a "${buildreq/%-devel/}" = "$buildreq" ]; then
# if a -devel exists for this package, use it
rpm -q ${buildreq}-devel &>/dev/null &&
buildreq="$(rpm -q --qf %{name} ${buildreq}-devel)"
buildreq="$(rpm -q --qf "%{name}\n" ${buildreq}-devel|head -n1)"
fi
if [ "$buildreq" ]; then
# finally print buildrequires block
@ -2362,20 +2430,29 @@ $(echo $solibpath | sed "s|-[0-9.]*\.so|.so|")"
fi
done ) | sort -u >> $frequires
[ "$replace_autobuildreq" = 1 ] &&
notify.note "
${NOTE}"$"replacing the AUTOBUILDREQ block by:""${NORM}"
notify.note "
## AUTOBUILDREQ-BEGIN"
cat $frequires
notify.note "## AUTOBUILDREQ-END
"
notify.note "## AUTOBUILDREQ-END"
if [ "$replace_autobuildreq" = 1 ]; then
sed -i "/^## AUTOBUILDREQ/d" $frequires
sed -i -ne "/## AUTOBUILDREQ-BEGIN/{p;r $frequires" \
-e ':a;n;/## AUTOBUILDREQ-END/{p;b};ba};p' \
$SRPM_SPECFILE_WITH_PATH
sed -n '/^## AUTOBUILDREQ-BEGIN/,/^## AUTOBUILDREQ-END/p' \
$SRPM_SPECFILE_WITH_PATH | grep -q "%if" && skip_replace_autobuildreq=1
if [ "$skip_replace_autobuildreq" ]; then
notify.note "${NOTE}"$"
skipping replacing the AUTOBUILDREQ block because it contains a conditional macro""${NORM}"
else
notify.note "${NOTE}"$"
Replacing the AUTOBUILDREQ block and recreating the SRPM""${NORM}"
sed -i "/^## AUTOBUILDREQ/d" $frequires
sed -i -ne "/## AUTOBUILDREQ-BEGIN/{p;r $frequires" \
-e ':a;n;/## AUTOBUILDREQ-END/{p;b};ba};p' \
$SRPM_SPECFILE_WITH_PATH
eval "\
rpmbuild -bs $USER_RPMDEFINE_OPTS $rpmbuild_opts \
$SRPM_SPECFILE_WITH_PATH 2>&1"
fi
fi
rm -f $frequires
@ -2450,7 +2527,7 @@ pck_newver = \"$pck_newver\", pck_newrel = \"$pck_newrel\""
notify.debug "pck_rpmrelease = $pck_rpmrelease"
local tmpextractdir
tmpextractdir=$(mktemp -q -d -t rpm_extract.XXXXXXXX)
tmpextractdir=$(mktemp -q -d -p /var/tmp -t rpm_extract.XXXXXXXX)
[[ $? -eq 0 ]] ||
notify.error $"can't create temporary files"
notify.debug "$FUNCNAME: tmpextractdir = $tmpextractdir"
@ -2584,7 +2661,7 @@ calculate the md5/sha1 hashing values""${NORM}"
--urlnum "$ftp_server_upload_num" \
--proxy "$proxy" \
--proxy-user "$proxy_user" \
"$pck_name" ${SPEC_OBSOLETES[@]}
"$pck_name"
# FIXME: `$?' is nonzero if the argument of `--urllist' is "";
# this generally happens with a buggy configuration file but we
# do not stop the execution here with an errors condition
@ -2650,13 +2727,7 @@ ftp_server_upload_num = \"$ftp_server_upload_num\" (was unset)"
notify.debug "\
ftp_server_upload_num = \"$ftp_server_upload_num\""
if [ "${ftp_rw_server[$ftp_server_upload_num]}" ]; then
repository.is_reachable "${ftp_rw_server[$ftp_server_upload_num]}"
# NOTE. notify.error --> notify.warning because host command fails
# in qemu-arm environment (1.4.18)
[ $? -eq 0 ] || notify.warning $"\
server unreachable"": \`${ftp_rw_server[$ftp_server_upload_num]}'"
else
if [ ! "${ftp_rw_server[$ftp_server_upload_num]}" ]; then
notify.error $"\
you have no read write access to url#$ftp_server_upload_num"
break

View File

@ -1,6 +1,6 @@
#!/bin/bash
# pck-create -- plugin for @package@
# Copyright (C) 2004-2013 Davide Madrisan <davide.madrisan@gmail.com>
# Copyright (C) 2004-2015 Davide Madrisan <davide.madrisan@gmail.com>
[ -z "$BASH" ] || [ ${BASH_VERSION:0:1} -lt 3 ] &&
{ echo $"this script requires bash version 3 or better" >&2 && exit 1; }
@ -40,9 +40,13 @@ spec_cmd_configure_autotools="%configure"
spec_cmd_make_autotools="%make"
spec_cmd_makeinstall_autotools="%makeinstall"
spec_cmd_configure_cmake="%cmake -d build"
spec_cmd_make_cmake="%make"
spec_cmd_makeinstall_cmake="%makeinstall -C build"
spec_cmd_configure_autogen="./autogen.sh\n%configure"
spec_cmd_make_autogen="%make"
spec_cmd_makeinstall_autogen="%makeinstall"
spec_cmd_configure_cmake="%cmake"
spec_cmd_make_cmake="%cmake_build"
spec_cmd_makeinstall_cmake="%cmake_install"
spec_cmd_configure_scons=""
spec_cmd_make_scons="scons"
@ -56,6 +60,10 @@ spec_cmd_configure_default=""
spec_cmd_make_default=""
spec_cmd_makeinstall_default=""
spec_cmd_configure_meson="%meson"
spec_cmd_make_meson="%meson_build"
spec_cmd_makeinstall_meson="%meson_install"
[ "$perl_Makefile_generator" ] || perl_Makefile_generator="Makefile.PL"
preserve_dot_git=0
@ -105,8 +113,7 @@ function usage() {
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""
@ -119,7 +126,7 @@ function usage() {
"$"Override packager full name""
--packager-email
"$"Override packager email""
--git-branch "$"Specify a git branch""
--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>""
@ -134,7 +141,7 @@ function usage() {
"$"Samples"":
@frontend@ -s ~/software/@package@-@version@.tar.bz2 -t standard -o @package@.spec
@frontend@ -s http://ftp.qilinux.it/devel/tools/@package@/@package@-@version@.tar.bz2
@frontend@ -s http://ftp.openmamba.org/devel/tools/@package@/@package@-@version@.tar.bz2
@frontend@ -s @package@-@version@.tar.bz2 --changelog \"First build\"
@frontend@ -s git://anongit.freedesktop.org/gstreamer/gst-omx \\
--git-branch=\"raspberry\" --preserve-dot-git -o gst-omx.spec
@ -392,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"
@ -403,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"
@ -503,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"
@ -528,11 +547,13 @@ function specfile.create() {
# 'pck_tarball' = absolute path of '$1'
local pck_tarball
local pck_name pck_version
local pck_name
local pck_version="$4"
case "$2" in
git://*|http://*.git|https://*.git)
git.create_tarball \
--pck-version="$pck_version" \
--git-branch="$git_branch" \
--preserve-dot-git="$preserve_dot_git" \
--destdir="$source_dir" "$2"
@ -578,9 +599,6 @@ ${proxy:+--proxy $proxy} ${proxy_user:+--proxy-user $proxy_user} \
[ "$pck_name" ] ||
notify.error $"cannot get the package name, use the \`-n' option"
[[ "${pck_newver//[0-9\.]/}" ]] &&
notify.error $"invalid version number"" -- \`$pck_newver'"
[ "$pck_version" ] || pck_version=${4:-`echo $pck_tarball | sed -n "\
/[0-9]/!q # return nothing if no number is found in the package name
s,.*/,, # remove directory name, if any
@ -636,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"
@ -820,6 +838,9 @@ echo "$line" | sed "s|.*=[\ \t]*\"\(.*\)\"|\1|") ..." # vim highlight need a "
MANUAL
THANKS'
local standard_docs_dirlist='
LICENSES'
local standard_docs_devel_list='
BACKLOG
BUGS
@ -839,6 +860,14 @@ echo "$line" | sed "s|.*=[\ \t]*\"\(.*\)\"|\1|") ..." # vim highlight need a "
# 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
@ -858,10 +887,12 @@ ${standard_docs_devel:+$standard_docs_devel }$currdoc"
local build_techology="unknown"
case "$spec_type" in
kde3|kde4|perl|python)
perl|python)
build_techology="$spec_type"
;;
*) if [ -e $tmpdir/$pck_rootdir/CMakeLists.txt ]; then
*) if [ -e $tmpdir/$pck_rootdir/meson.build ]; then
build_techology="meson"
elif [ -e $tmpdir/$pck_rootdir/CMakeLists.txt ]; then
build_techology="cmake"
elif [ -x $tmpdir/$pck_rootdir/configure ]; then
build_techology="autotools"
@ -869,6 +900,8 @@ ${standard_docs_devel:+$standard_docs_devel }$currdoc"
-e $tmpdir/$pck_rootdir/makefile -o \
-e $tmpdir/$pck_rootdir/GNUmakefile ]; then
build_techology="makefile"
elif [ -x $tmpdir/$pck_rootdir/autogen.sh ]; then
build_techology="autogen"
elif [ -e $tmpdir/$pck_rootdir/SConstruct -o \
-e $tmpdir/$pck_rootdir/Sconstruct -o \
-e $tmpdir/$pck_rootdir/sconstruct ]; then
@ -926,7 +959,6 @@ $spec_cmd_configure_autotools --enable-gtk-doc"
# 12. debug package
local debug_package="0"
[ -n "$rpm_macro_debug_package" ] && debug_package="1"
# FIXME: missing support for:
# pkgconfig files

View File

@ -65,8 +65,8 @@ locales: merge-pot-files
$(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 "[UNTRASLATED STRING]"; exit 1; } || \
@/bin/grep -q 'msgstr[ \t]*""' $(pck_catalog) && \
{ echo "[UNTRANSLATED STRING]"; exit 1; } || \
echo "[NONE]"
install: $(pck_catalog:.po=.mo)

View File

@ -3,19 +3,6 @@
# This file is distributed under the same license as the autospec package.
# Davide Madrisan <davide.madrisan@gmail.com>, 2004-2013.
#
msgid ""
msgstr "Project-Id-Version: autospec 1.16.4\n"
"Report-Msgid-Bugs-To: davide.madrisan@gmail.com\n"
"POT-Creation-Date: 2013-07-13 19:30+0100\n"
"PO-Revision-Date: 2013-07-13 19:30+0100\n"
"Last-Translator: Davide Madrisan <davide.madrisan@gmail.com>\n"
"Language-Team: \n"
"Language: Italian \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
msgid "this script requires bash version 2 or better"
msgstr "questo script richiede bash versione 2 o superiore"
@ -203,8 +190,8 @@ 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}'"
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'"
@ -237,12 +224,12 @@ msgstr "tema di colori sconosciuto \\`$color_scheme': output con colori "
msgid "utility not found"
msgstr "programma non trovato"
msgid "missing mandatory arg"
msgstr "parametro mancante"
msgid "usage error (--ftp/--html)"
msgstr "errato utilizzo (--ftp/--html)"
msgid "missing mandatory arg"
msgstr "parametro mancante"
msgid "'\\\\' characters detected in \\$pck_name"
msgstr "trovato carattere '\\\\' in \\$pck_name"
@ -288,15 +275,15 @@ msgstr "pacchetto non trovato"
msgid "unknown action"
msgstr "azione sconosciuta"
msgid "not the expected package version"
msgstr "non è la versione di pacchetto prevista"
msgid "cloning git repository"
msgstr "clonazione del repository"
msgid "cannot clone git repository"
msgstr "impossibile clonare il repository git"
msgid "cannot checkout the specified tag"
msgstr "impossibile fare il checkout del tag specificato"
msgid "creating the compressed source tarball"
msgstr "creazione del file sorgente compresso"
@ -517,6 +504,10 @@ msgstr "Sostituisce il nome completo del packager"
msgid "Override packager email"
msgstr "Ridefinisce l'indirizzo mail del packager"
msgid "Override release append tag (predefined: $DISTRO_rpm)"
msgstr "Ridefinisce l'etichetta aggiunta alla release (predefinito: "
"$DISTRO_rpm)"
msgid "action"
msgstr "azione"
@ -538,6 +529,11 @@ msgstr "Cerca i file non pacchettizzati"
msgid "Replace the block AUTOBUILDREQ"
msgstr "Aggiorna il blocco AUTOBUILDREQ"
msgid "Skip rpmbuild %prep macro when retrying building from an existing "
"builddir"
msgstr "Salta la macro %prep di rpmbuild per riprovare la compilazione da "
"una builddir esistente"
msgid "Remove all the temporary files except (s)rpm packages"
msgstr "Rimuove tutti i file temporanei"
@ -583,8 +579,8 @@ msgstr "specfile in formato non supportato"
msgid "release number: unsupported format"
msgstr "numero di release: formato non supportato"
msgid "new release \\`$pck_newrel' must be greater than current one \\`"
"$SPEC_RELEASE'"
msgid "new release \\`$pck_newrel' must be greater than current one "
"\\`$SPEC_RELEASE'"
msgstr "la nuova release \\`$pck_newrel' deve essere maggiore di quella "
"corrente \\`$SPEC_RELEASE'"
@ -721,8 +717,8 @@ 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}'"
msgstr "trovato ${NOTE}BuildRequirement non soddisfatto${NORM} "
"\\`${NOTE}$f${NORM}'"
msgid "testing out specfile"
msgstr "esecuzione dei test sullo specfile"
@ -741,7 +737,8 @@ msgstr "Sembra ok ma non dimenticare di eseguire i test di qualità e "
"sicurezza"
msgid "no arch-specific pattern translations for unpackaged files"
msgstr "nessuna corrispondenza di pattern legati all'architettura per i file non pacchetizzati"
msgstr "nessuna corrispondenza di pattern legati all'architettura per i file "
"non pacchetizzati"
msgid "Add the following files in the right %files blocks"
msgstr "Smistare i seguenti file nelle sezioni %files corrispondenti"
@ -752,8 +749,17 @@ msgstr "release del nuovo pacchetto non indicata"
msgid "ignoring requirement"
msgstr "requirement ignorato"
msgid "replacing the AUTOBUILDREQ block by:"
msgstr "sostituzione del blocco AUTOBUILDREQ con:"
msgid "\n"
"skipping replacing the AUTOBUILDREQ block because it contains a "
"conditional macro"
msgstr "\n"
"blocco AUTOBUILDREQ non sostituito perché contiene una macro "
"condizionale"
msgid "\n"
"Replacing the AUTOBUILDREQ block and recreating the SRPM"
msgstr "\n"
"Sostituzione del blocco AUTOBUILDREQ e ricreazione del pacchetto SRPM"
msgid "rpm exited with error code:"
msgstr "rpm è terminato con il codice di errore:"
@ -764,9 +770,6 @@ msgstr "controllo dello specfile alla ricerca di comuni errori"
msgid "checking packages for common mistakes"
msgstr "controllo dei pacchetti alla ricerca di comuni errori"
msgid "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"
@ -832,11 +835,8 @@ msgstr "specfile per pacchetti ghc"
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 kde5 packages"
msgstr "specfile per pacchetti kde5"
msgid "specfile for common library packages"
msgstr "specfile per librerie"
@ -859,8 +859,10 @@ msgstr "specfile per applicazioni web"
msgid "Redirect the output to the file <outfile>"
msgstr "Redirige lo standard output sul file <outfile>"
msgid "Specify a git branch"
msgstr "Specifica un branch git"
msgid "Specify a git branch or tag and (optionally) a commit by appending "
"@commit_id"
msgstr "Specifica un branch o un tag git e (opzionalmente) un commit "
"aggiungendo @commit_id"
msgid "Do not remove git files"
msgstr "Non rimuove i file git"
@ -892,9 +894,6 @@ 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'"
@ -938,6 +937,17 @@ msgstr "sembra un modulo python (in questo caso usa \\`-t python')"
msgid "created specfile"
msgstr "creato specfile"
msgid "checking Source URL with: "
msgstr "controllo della URL sorgente con: "
msgid "redirect detected: replacing from \\`$SPEC_URL' to "
"\\`${http_effective_url}'"
msgstr "redirezione rilevata: sostituzione da \\`$SPEC_URL' a "
"\\`${http_effective_url}'"
msgid "invalid return code for \\`$SPEC_URL': $http_code"
msgstr "codice restituito non valido per \\`$SPEC_URL': $http_code"
msgid "does not point to a valid internet address"
msgstr "non fa riferimento ad un indirizzo internet"
@ -956,6 +966,17 @@ msgstr "manca almeno una direttiva \\`%defattr'"
msgid "use rpm macros if possible:"
msgstr "utilizzare le macro rpm quando possibile:"
msgid ""
msgstr "Project-Id-Version: autospec 1.16.4\n"
"Report-Msgid-Bugs-To: davide.madrisan@gmail.com\n"
"POT-Creation-Date: 2013-07-13 19:30+0100\n"
"PO-Revision-Date: 2013-07-13 19:30+0100\n"
"Last-Translator: Davide Madrisan <davide.madrisan@gmail.com>\n"
"Language-Team: \n"
"Language: Italian \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
msgid "localization files must be packaged via \\`%find_lang'"
msgstr "trovati file di localizzazione non gestiti da \\`%find_lang'"
@ -1083,3 +1104,6 @@ msgid "${NOTE}Security checks: ${#rpmpkg_name[@]} package(s) checked: "
"${NORM}${WARN}$total_issues${NORM}${NOTE} warning(s).${NORM}"
msgstr "${NOTE}Controlli di sicurezza: pacchetti rpm: ${#rpmpkg_name[@]}; "
"problemi riscontrati: ${NORM}${WARN}$total_issues${NORM}"
#~ msgid "not the expected package version"
#~ msgstr "non è la versione di pacchetto prevista"

View File

@ -1,5 +1,5 @@
# Makefile for autospec
# Copyright (C) 2008,2011,2013 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 := ghc gnome kde3 kde4 library ocaml-libs perl python standard standard-daemon web
pck_templates := ghc gnome kde5 kf6 library ocaml-libs perl perl-build python python-setuptools standard standard-daemon web
all:

View File

@ -1,15 +1,16 @@
%define ghc_ver %(ghc --version | sed "s|.*version ||")
%define pkgname %(echo %name | sed "s|^ghc-||")
%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: ...
Summary: GHC ...
Group: Development/Libraries
Vendor: @VENDOR@
Distribution: @DISTRO@
Packager: @packager_fullname@ <@packager_email@>
URL: http://hackage.haskell.org/package/%{pkgname}
Source: ...
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
@ -21,61 +22,60 @@ Requires(post): %{__install_info}
Requires(preun): %{__install_info}
@fi:infopages
BuildRequires: ghc
BuildRequires: hscolour
BuildRequires: ghc-rpm-macros
Requires: ghc = %{ghc_ver}
BuildRoot: @rpm_default_buildroot@
%description
...
%{summary}.
## Remove the following block if there is no binary tool provided
#%package -n %{pkgname}
#Group: Applications/Development
#Summary: ...
#
#%description -n %{pkgname}
#...
%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
runghc Setup.hs configure \\
--prefix=%{_prefix} --libdir=%{_libdir}
runghc Setup.hs build
runghc Setup.hs haddock --html-location=URL --hyperlink-source
%ghc_lib_build
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
runghc Setup.hs copy --destdir=%{buildroot}
runghc Setup.hs register \\
--gen-pkg-config="%{buildroot}%{_libdir}/ghc-%{ghc_ver}/%{pkgname}-%{version}/%{pkgname}-%{version}.conf"
%ghc_lib_install
rm -f %{buildroot}%{_ghclicensedir}/%{name}/LICENSE
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%post
ghc-pkg register %{_libdir}/ghc-%{ghc_ver}/%{pkgname}-%{version}/%{pkgname}-%{version}.conf &>/dev/null || true
:
%preun
ghc-pkg unregister %{pkgname}-%{version} &>/dev/null || true
:
%files
%files -f %{name}.files
%defattr(-,root,root)
%dir %{_libdir}/ghc-%{ghc_ver}/%{pkgname}-%{version}
%{_libdir}/ghc-%{ghc_ver}/%{pkgname}-%{version}/*
%dir %{_docdir}/%{pkgname}-%{version}
%{_docdir}/doc/%{pkgname}-%{version}/LICENSE
%dir %{_docdir}/%{pkgname}-%{version}/html
%{_docdir}/%{pkgname}-%{version}/html/*
%license LICENSE
## Remove the following block if there is no binary tool provided
#%files -n %{pkgname}
#%defattr(-,root,root)
#%{_bindir}/%{pkgname}
%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@

View File

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

View File

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

View File

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

95
templates/kde5 Normal file
View File

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

93
templates/kf6 Normal file
View File

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

View File

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

View File

@ -1,4 +1,3 @@
## this macro only works for packages with name matching the regexp "ocaml-.*"
%define ocamlpck @pck_name_tail@
Name: @pck_name@
@ -15,19 +14,14 @@ 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-camlp4-devel
BuildRequires: ocaml-findlib
## remove the following build requirement if this package is compiled
## by using the OCaml native-code compiler (ocamlopt)
Requires: ocaml-runtime
BuildRoot: @rpm_default_buildroot@
%description
...
%{summary}.
@if:pck_devel
## remove the following two blocks if there's no devel files
%package devel
Group: Development/Libraries/OCaml
Summary: Development files for %{name}
@ -37,64 +31,42 @@ Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release}
This package contains libraries and signature files for developing applications that use %{name}.
@fi:pck_devel
%debug_package
%prep
%setup -q
%build
## remove the unsupported options (no real standard exists...)
./configure \\
\ --prefix %{_prefix} \\
\ --localstatedir %{_localstatedir} \\
\ --sharedstatedir %{_sharedstatedir} \\
\ --sysconfdir %{_sysconfdir} \\
\ --enable-tests \\
\ --enable-docs \\
\ --enable-examples \\
\ --disable-ldconf
## extra arguments that sometimes can be passed to './configure'
## -host %{_host}
## -cc "gcc ${RPM_OPT_FLAGS/-fomit-frame-pointer/}"
## --destdir %{buildroot}
%make all
%make opt
dune build
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
export OCAMLFIND_DESTDIR=%{buildroot}$(ocamlfind printconf destdir)
export DLLDIR=$OCAMLFIND_DESTDIR/stublibs
DESTDIR=%{buildroot} dune install --prefix "%{_prefix}" --libdir "%{_libdir}/ocaml"
install -d $OCAMLFIND_DESTDIR/%{ocamlpck}
install -d $OCAMLFIND_DESTDIR/stublibs
make install
rm -rf %{buildroot}/usr/doc
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%files
%defattr(-,root,root)
## note: this list is just an example; modify as required
# %dir %{_libdir}/ocaml/%{ocamlpck}
# %{_libdir}/ocaml/%{ocamlpck}/META
# %{_libdir}/ocaml/%{ocamlpck}/*.cma
# %{_libdir}/ocaml/%{ocamlpck}/*.cmi
# %{_libdir}/ocaml/%{ocamlpck}/*.cmxs
# %{_libdir}/ocaml/stublibs/*.so*
# %doc COPYING
%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
## remove this block if there are no devel files
## note: this list is just an example; modify as required
%files devel
%defattr(-,root,root)
# %{_libdir}/ocaml/%{ocamlpck}/*.a
# %{_libdir}/ocaml/%{ocamlpck}/*.cmx
# %{_libdir}/ocaml/%{ocamlpck}/*.cmxa
# %{_libdir}/ocaml/%{ocamlpck}/*.mli
# %doc CHANGES README
# %doc doc/html/
# %doc examples/
%{_libdir}/ocaml/%{ocamlpck}/*.a
%{_libdir}/ocaml/%{ocamlpck}/*.cmx
%{_libdir}/ocaml/%{ocamlpck}/*.cmxa
%{_libdir}/ocaml/%{ocamlpck}/*.mli
#%doc CHANGES* README.md
@fi:pck_devel
%changelog

View File

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

55
templates/perl-build Normal file
View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -33,8 +33,6 @@ Source: ...
License: ...
## AUTOBUILDREQ-BEGIN
## AUTOBUILDREQ-END
BuildArch: noarch
BuildRoot: @rpm_default_buildroot@
%description
...

View File

@ -41,6 +41,35 @@ function specfile.checksyntax() {
notify.note " * $specfile"
local total_issues=0
local user_agent="Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/132.0"
# 0. checking if 'Source[0]' is a valid internet address
# (skip this test if no '%setup' section has been found)
test.skip $test_number || {
notify.note "$(test.num2str). ${NOTE}"\
"url""${NORM}..."
if [[ "$SPEC_URL" ]]; then
{ notify.debug "\
\`url': "$"checking Source URL with: ""\`curl -s -o /dev/null -w \"%{http_code}\" -A \"${user_agent}\" $SPEC_URL'"
}
http_code=`curl -s -o /dev/null -w "%{http_code}" -A "${user_agent}" $SPEC_URL`
if [ "$http_code" != "200" ]; then
if [ "${http_code:0:2}" == "30" ]; then
http_effective_url=`curl -w "%{url_effective}" -I -L -s -o /dev/null -A "${user_agent}" -S $SPEC_URL`
{ notify.warning "\
\`url': "$"redirect detected: replacing from \`$SPEC_URL' to \`${http_effective_url}'"
let "total_issues += 1";
}
sed -i "s|^\(URL:[[:space:]]*\)$SPEC_URL.*|\1${http_effective_url}|" $specfile
else
{ notify.error "\
\`url': "$"invalid return code for \`$SPEC_URL': $http_code"
let "total_issues += 1"; }
fi
fi
fi; }
test_number=$(($test_number + 1))
# 1. checking if 'Source[0]' is a valid internet address
# (skip this test if no '%setup' section has been found)

View File

@ -1,6 +1,6 @@
#!/bin/bash
# test01_pkgquality -- @package@ test (rpm quality checks)
# Copyright (C) 2008,2012,2013 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
@ -288,7 +288,7 @@ $"checking for binary files installed in /etc (see FHS)""${NORM}..."
let "i = 0"
for pck in ${rpmpkg_name[@]}; do
pushd $tmpextractdir/$i >/dev/null
for f in $( find ./etc -type f -perm +111 2>/dev/null ); do
for f in $( find ./etc -type f -perm /111 2>/dev/null ); do
case $f in
./etc/rc.d/init.d/*) ;;
*) let "warning = 1" &&

View File

@ -1,6 +1,6 @@
#!/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
@ -89,7 +89,7 @@ $"checking for RPATH vulnerabilities""${NORM}..."
# find ELF binaries (ELF 32-bit LSB executable)
# and libs (ELF 32-bit LSB shared object)
for f in $(find -mindepth 2 -perm +111 -type f); do
for f in $(find -mindepth 2 -perm /111 -type f); do
if [[ "$(file $f | grep " ELF ")" ]]; then
rpath="$(security.filecheckrpath $f)"
if [ "$rpath" ]; then
@ -111,7 +111,7 @@ $"checking for setuid binaries""${NORM}..."
let "i = 0"
for pck in ${rpmpkg_name[@]}; do
pushd $tmpextractdir/$i >/dev/null
for f in $(find -mindepth 2 -perm +111 -type f 2>/dev/null); do
for f in $(find -mindepth 2 -perm /111 -type f 2>/dev/null); do
if [[ "$(LC_ALL=C file $f | grep " setuid ")" ]]; then
notify.warning "${NORM}${pck##*/} --> ${f/./}"
let "total_issues += 1"
@ -147,7 +147,7 @@ $"checking for unsecure use of \`\$\$' in shell and perl scripts""${NORM}..."
let "i = 0"
for pck in ${rpmpkg_name[@]}; do
pushd $tmpextractdir/$i >/dev/null
for f in $(find -mindepth 1 -perm +111 -type f); do
for f in $(find -mindepth 1 -perm /111 -type f); do
# we are interesting only in shell scripts
[[ "$(file $f | grep "shell script\|perl script")" ]] ||
continue

View File

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

View File

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