Compare commits

...

118 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
45 changed files with 1105 additions and 721 deletions

View File

@ -1,3 +1,34 @@
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>

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

26
NEWS
View File

@ -1,3 +1,29 @@
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

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

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.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[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,64 +1,91 @@
## 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/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,^/usr/share/icons,%{_kde4_icondir},
s,^/opt/kde/share/kde4/services,%{_kde4_servicesdir},
s,^/opt/kde/share/kde4/servicetypes,%{_kde4_servicetypesdir},
s,^/opt/kde/share/locale,%{_kde4_localedir},
s,^/opt/kde/share/mime/packages,%{_kde4_xdgmimedir},
s,^/opt/kde/share/mimelnk,%{_kde4_mimedir},
s,^/opt/kde/share/sounds,%{_kde4_soundsdir},
s,^/opt/kde/share/templates,%{_kde4_templatesdir},
s,^/opt/kde/share/wallpapers,%{_kde4_wallpaperdir},
s,^/opt/kde/share,%{_kde4_sharedir},
"
## conversion rules which are (target) architecture specific
### i586
format_unpackaged_file_list_i586="\
# kde4
s,^/opt/kde/lib/kde4/libexec,%{_kde4_libexecdir},
s,^/opt/kde/lib/kde4/plugins,%{_kde4_pluginsdir},
s,^/opt/kde/lib,%{_kde4_libdir},
# 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},
@ -69,22 +96,40 @@ format_unpackaged_file_list_arm="$format_unpackaged_file_list_i586"
### x86_64
format_unpackaged_file_list_x86_64="\
# kde4
s,^/opt/kde/lib64/kde4/libexec,%{_kde4_libexecdir},
s,^/opt/kde/lib64/kde4/plugins,%{_kde4_pluginsdir},
s,^/opt/kde/lib64,%{_kde4_libdir},
# 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/lib/python3.3/site-packages,%{python3_sitelib},
s,^/usr/lib64/python3.11/site-packages,%{python3_sitearch},
s,^/usr/lib/python3.11/site-packages,%{python3_sitelib},
s,^/usr/lib64/python3.7/site-packages,%{python37_sitearch},
s,^/usr/lib/python3.7/site-packages,%{python37_sitelib},
s,^/usr/lib64/python3.9/site-packages,%{python39_sitearch},
s,^/usr/lib/python3.9/site-packages,%{python39_sitelib},
s,^/usr/lib64/python3.10/site-packages,%{python310_sitearch},
s,^/usr/lib/python3.10/site-packages,%{python310_sitelib},
s,^/usr/lib64/python3.12/site-packages,%{python312_sitearch},
s,^/usr/lib/python3.12/site-packages,%{python312_sitelib},
# pam
s,^/usr/lib64/security,%{_pam_moduledir},
# libraries
s,^/usr/libexec64,%{_libexecdir},
s,^/usr/libexec,%{_prefix}/libexec,
s,^/usr/lib64,%{_libdir},
s,^/usr/lib,%{_prefix}/lib,
s,^/lib64,/%{_lib},"
### aarch64
format_unpackaged_file_list_aarch64="$format_unpackaged_file_list_x86_64"

View File

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

View File

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

View File

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

View File

@ -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

@ -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,19 +918,30 @@ function git.download() {
notify.debug "$FUNCNAME: token_dirname = \"$token_dirname\""
notify.debug "$FUNCNAME: token_basename = \"$token_basename\""
if [ -e $destdir/$token_basename ]; then
if [ "$force_download" = "0" ]; then
notify.note "[${filenum:-*}] $NOTE$token_basename$NORM ... "$"skipped"
return 0
fi
fi
local git_branch="${token_dirname/*\/}"
notify.debug "$FUNCNAME: git_branch = \"$git_branch\""
git.create_tarball \
--pck-version "$pck_version" \
--destdir "$destdir" \
--preserve-dot-git "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
@ -947,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
@ -962,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
@ -992,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
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"
@ -1016,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
@ -1030,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

@ -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

@ -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,10 +200,6 @@ 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
.br
\fIkde5\fR : specfile per pacchetti kde5
.br
\fIlibrary\fR : specfile per librerie

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

@ -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}'"
@ -2022,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 $"\
@ -2051,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" \
@ -2088,7 +2116,8 @@ ${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"
@ -2097,6 +2126,8 @@ ${proxy:+--proxy $proxy} ${proxy_user:+--proxy-user $proxy_user} \
[ "$BUILD_ARCH" != "$target_cpu" ] &&
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
@ -2105,7 +2136,6 @@ ${proxy:+--proxy $proxy} ${proxy_user:+--proxy-user $proxy_user} \
$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[*]})"
@ -2149,17 +2179,17 @@ $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 $USER_RPMDEFINE_OPTS $rpmbuild_opts --nodeps \
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 $USER_RPMDEFINE_OPTS $rpmbuild_opts --nodeps \
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 $USER_RPMDEFINE_OPTS $rpmbuild_opts --nodeps \
rpmbuild -ba $USER_RPMDEFINE_OPTS $rpmbuild_opts \
$SRPM_SPECFILE_WITH_PATH 2>&1"
fi
local rpmbuild_retcode="$?"
@ -2169,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}'"
@ -2191,8 +2221,8 @@ format_unpackaged_file_list_arch = $format_unpackaged_file_list_arch"
[ "$skipline" = 1 ] || echo "$line"
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_arch};\
$format_unpackaged_file_list_common" > $tmpunpackfiles
sed -e "$format_unpackaged_file_list_common;\
${!format_unpackaged_file_list_arch}" > $tmpunpackfiles
if [ -s "$tmpunpackfiles" ]; then
notify.error $"\
@ -2249,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")
@ -2280,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
:
@ -2295,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\""
@ -2343,12 +2386,25 @@ $(echo $solibpath | sed "s|-[0-9.]*\.so|.so|")"
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 &&
@ -2374,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
@ -2462,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"
@ -2596,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
@ -2662,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

@ -44,9 +44,9 @@ spec_cmd_configure_autogen="./autogen.sh\n%configure"
spec_cmd_make_autogen="%make"
spec_cmd_makeinstall_autogen="%makeinstall"
spec_cmd_configure_cmake="%cmake -d build"
spec_cmd_make_cmake="%make"
spec_cmd_makeinstall_cmake="%makeinstall -C build"
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"
@ -60,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
@ -109,8 +113,6 @@ 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""
@ -124,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>""
@ -139,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
@ -413,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"
@ -646,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"
@ -830,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
@ -849,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
@ -868,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"
@ -938,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,12 +835,6 @@ 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"
@ -862,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"
@ -895,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'"
@ -941,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"
@ -959,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'"
@ -1086,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

@ -18,7 +18,7 @@ srcdir = ..
include $(srcdir)/Makefile.env
pck_templates := ghc gnome kde3 kde4 kde5 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,5 +1,5 @@
%define ghc_ver %(ghc --numeric-version)
%define pkgname %(echo %name | sed "s|^ghc-||")
%define pkg_name %(echo %name | sed "s|^ghc-||")
Name: @pck_name@
Version: @pck_version@
@ -9,8 +9,8 @@ Group: Development/Libraries
Vendor: @VENDOR@
Distribution: @DISTRO@
Packager: @packager_fullname@ <@packager_email@>
URL: http://hackage.haskell.org/package/%{pkgname}
Source: http://hackage.haskell.org/package/%{pkgname}-%{version}/%{pkgname}-%{version}.tar.gz
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
@ -22,60 +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 -v2 \\
\ --prefix=%{_prefix} \\
\ --libdir=%{_libdir} \\
\ --libexecdir=%{_libexecdir} \\
\ --docdir=%{_docdir}/%{name}-%{version}
runghc Setup.hs build
runghc Setup.hs haddock --executable --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 || :
%preun
ghc-pkg unregister %{pkgname}-%{version} &>/dev/null || :
%files
%files -f %{name}.files
%defattr(-,root,root)
%{_libdir}/ghc-%{ghc_ver}/%{pkgname}-%{version}
%dir %{_docdir}/%{name}-%{version}
%{_docdir}/%{name}-%{version}/LICENSE
%{_docdir}/%{name}-%{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@

View File

@ -3,14 +3,13 @@
Name: @pck_name@
Version: @pck_version@
Release: @spec_first_release@@DISTRO_rpm@
Summary: KDE Frameworks 5 ...
Summary: ...
Group: ...
Vendor: @VENDOR@
Distribution: @DISTRO@
Packager: @packager_fullname@ <@packager_email@>
URL: http://www.kde.org
URL: https://kde.org
Source: ...
# Source: http://download.kde.org/stable/frameworks/%{majver}/...-%{version}.tar.xz
License: ...
## AUTOBUILDREQ-BEGIN
## note: run 'autospec -u -a6 @pck_name@' to get the list of build requirements.
@ -19,7 +18,6 @@ BuildRequires: cmake
BuildRequires: rpm-macros-kde5
BuildRequires: extra-cmake-modules
Requires: lib%{name} = %{?epoch:%epoch:}%{version}-%{release}
BuildRoot: @rpm_default_buildroot@
%description
...
@ -56,28 +54,14 @@ This package contains libraries and header files for developing applications tha
%makeinstall -C build
@if:i18n
%find_lang %{name}5_qt --with-qt --all-name || touch %{name}5_qt.lang
%find_lang %{name} --with-qt --with-man --with-html --all-name || touch %{name}.lang
@fi:i18n
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%post -n lib%{name}
@if:shared_libraries
## remove the following line if no dynamic libraries are provided by this package
/sbin/ldconfig
@fi:shared_libraries
exit 0
%postun -n lib%{name}
@if:shared_libraries
## remove the following line if no dynamic libraries are provided by this package
/sbin/ldconfig
@fi:shared_libraries
exit 0
@if:i18n
%files -f %{name}5_qt.lang
%files -f %{name}.lang
@else:i18n
%files
@fi:i18n

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

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