Commit Graph

633 Commits

Author SHA1 Message Date
Fabio Valentini 22833277e6
supplying %date for %forge macros optional (backwards compatible) 2018-05-26 11:59:04 +02:00
David Abdurachmanov a1118c8054
Disable perl_default_subpackage_tests
This could be done in /usr/lib/rpm/macros.d/macros.perl, but redhat
macros can override it thus keeping all custom changes in one place.
We also don't need to rebuild perl again.

We have to disable test suite subpackages in perl packages to avoid
breaking conflict as the feature uses %__spec_check_pre, which is
used by us to disable %check section.

Alternative could be doing this in redhat macros:

%__spec_check_args %{nil}
%__spec_check_post exit 0

We basically remove '-e' from arguments and then at the end do 'exit 0',
but it's no perfect as someone could do 'exit ABC' in %check. We wanted
to completely disable %check section.

Signed-off-by: David Abdurachmanov <david.abdurachmanov@gmail.com>
2018-05-23 11:59:32 +02:00
Fabio Valentini 74b8dd05bb do not use modification time of tarball for computing %dist
Using the modification time of the snapshot tarball for computing dist is a bad idea, since it's different on different machines.

For example, the computed date during the `buildSRPMfromSCM` koji task is likely different from the local date when the package was prepared, and so package builds (especially EVRs and changelog entries) are not reproducible.

With this change, the snapshot date is not calculated magically, but the packager has to set "%global date YYYYMMDD" manually. I also adapted the documentation for the macro to reflect that change.

This is related to the following FPC issue: https://pagure.io/packaging-committee/issue/719
2018-05-10 17:11:47 +00:00
David Abdurachmanov 48413fb969 Enable annobin for riscv64
Signed-off-by: David Abdurachmanov <david.abdurachmanov@gmail.com>
2018-05-06 13:53:57 +02:00
David Abdurachmanov 5d2ab3509e Remove Requires: (annobin if gcc)
Signed-off-by: David Abdurachmanov <david.abdurachmanov@gmail.com>
2018-05-05 23:42:06 +02:00
David Abdurachmanov 15f1929445 Add riscv64 modifications for Fedora RISC-V bootstrap
Signed-off-by: David Abdurachmanov <david.abdurachmanov@gmail.com>
2018-05-05 19:30:21 +02:00
Peter Jones f7e8f73ead brp-mangle-shebangs: make it possible to use generated exclusion lists
This patch adds two additional rpm macros, __brp_mangle_shebangs_exclude_file
and __brp_mangle_shebangs_exclude_from_file, to specify files from which
to read the extended regexps used for excluding shebangs and target
files.

Additionally, this adds documentation in the macros file and
--help/--usage/-?/-h to brp-mangle-shebangs, so that it's possible to
actually discover what the intended behavior is without reading the
script itself.

Signed-off-by: Peter Jones <pjones@redhat.com>
2018-05-02 14:38:46 -04:00
Florian Weimer f25f1b7627 Reflect -fasynchronous-unwind-tables GCC default on POWER (#1550914) 2018-05-02 11:55:12 +02:00
Florian Weimer 6b620c91fb Use plain -fcf-protection compiler flag, without -mcet (#1570823) 2018-05-02 11:39:39 +02:00
Peter Jones 60cf200c3c Add Requires: efi-srpm-macros for %{efi}
Signed-off-by: Peter Jones <pjones@redhat.com>
2018-05-01 16:00:40 -04:00
Jason Tibbitts fdbb98bd99 Add %_metainfodir macro.
An intervening commit added a fix to %forgeautosetup, but the specfile
was not updated.  I indicated the fix in the %changelog.
2018-04-20 12:05:38 -05:00
Nicolas Mailhot e1493f294d fix patch application with autosetup (we have autosetup users now!) 2018-03-25 19:24:58 +02:00
Zbigniew Jędrzejewski-Szmek 8c5d5de24a Trim changelog entries older than two years
Inspired by http://gitweb.mageia.org/software/rpm/rpm-setup/tree/macros.in#n22
but changed to two years (3+ releases of Fedora).
2018-03-11 15:15:30 +01:00
Zbigniew Jędrzejewski-Szmek f843bf828a Drop Group tag and period from Summary 2018-03-11 14:52:54 +01:00
Jason Tibbitts b771d1efaf Update forge macros. 2018-03-05 10:22:04 -06:00
Nicolas Mailhot bea8f67f2c add another safety for people that write urls without protocols → quite a lot of indenting changes 2018-03-04 23:40:59 +01:00
Nicolas Mailhot 1073ba2a5a Handle more github quirks 2018-03-04 23:39:29 +01:00
Florian Weimer 8deb29e50a Make -fasynchronous-unwind-tables explicit on aarch64 (#1536431)
This reflects the default built into GCC.
2018-02-28 14:49:24 +01:00
Florian Weimer d5133f9acc Use -funwind-tables on POWER
Ideally, the GCC defaults should change as well, but let's put this into
redhat-rpm-config, too, similarly to -fasynchronous-unwind-tables.
2018-02-28 10:45:12 +01:00
Igor Gnatenko 71d7440127
ldconfig: make %ldconfig_post/%ldconfig_postun parameterized
If %ldconfig is not defined, then "%ldconfig_post/%ldconfig_postun foo"
will expand to " foo" which is breaking packages.

Also now it is possible to move %end into post/postun.

Reported-by: Terje Røsten <terjeros@phys.ntnu.no>
References: https://bugzilla.redhat.com/show_bug.cgi?id=1548331
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2018-02-25 07:11:46 +01:00
Florian Weimer 0448c23b73 Document the use of -Wl,z,lazy 2018-02-24 21:46:59 +01:00
Florian Weimer a4ec7ec768 Update release and changelog 2018-02-24 21:38:00 +01:00
Florian Weimer 509d4afbe4 Remove -z now from GCC specs file, now on command line (#1548397) 2018-02-24 21:37:06 +01:00
Florian Weimer 910c8585f3 Update release and changelog 2018-02-24 17:40:55 +01:00
Florian Weimer cd7779aeac First step of moving -z now to the gcc command line (#1548397) 2018-02-24 17:38:12 +01:00
Miro Hrončok 8f59b756ca Don't mangle shebangs with whitespace only changes (#1546993) 2018-02-22 11:12:28 +01:00
Igor Gnatenko 987e94f6ea
Move %end to %ldconfig_scriptlets
If people choose to use %ldconfig_post/%ldconfig_postun, let them to
deal with %end.

Reported-by: Harald Reindl <h.reindl@thelounge.net>
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1547838
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2018-02-22 07:58:50 +01:00
Igor Gnatenko 17746cb929
macros.ldconfig: %end section immediately
Some people tend to use comments in spec files which adds them into the
scriptlet and we don't want this.

Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2018-02-17 13:51:42 +01:00
Igor Gnatenko 40990bb864
brp-mangle-shebangs: add support for whitespaces in file names
Now it starts requiring bash instead of POSIX-compatible shell, but this
is not a problem since other scripts in here do same.

Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2018-02-15 10:03:34 +01:00
Miro Hrončok fb05a239d2
Allow to opt-out from shebang mangling for specific paths/shebangs
Introduces __brp_mangle_shebangs_exclude_from and __brp_mangle_shebangs_exclude

 * the first allows to explude specific paths from the mangling
 * the second allows to exlude specific shebangs

Both are used with `grep -E`. Similar escaping rules as in [1] apply.

[1] https://fedoraproject.org/wiki/Packaging:AutoProvidesAndRequiresFiltering
2018-02-15 08:47:54 +01:00
Igor Gnatenko 6bc9480501
buildflags.md: add missing quote
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2018-02-09 17:42:37 +01:00
Nicolas Mailhot f0c0098d58 Add bitbucket.org support to %forgemeta 2018-02-09 10:17:46 +01:00
Nicolas Mailhot c314c8a285 enhance slightly %forgemeta to help investigating when it is called in silent mode from another macro 2018-02-09 10:17:46 +01:00
Nicolas Mailhot c6cdde1b01 fix slight brokenness in %forgesetup error paths 2018-02-09 10:17:46 +01:00
Igor Gnatenko 51f1c66748
brp-mangle-shebangs: Simplify/Fix check for shebang starting with "/"
Reported-by: Jun Aruga <jaruga@redhat.com>
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1541057
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2018-02-08 10:38:45 +01:00
Igor Gnatenko 8444cee8f3
bump release
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2018-02-07 18:24:10 +01:00
Igor Gnatenko 35f7182912
brp-mangle-shebangs: fix mangling absolute paths in /.../env
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2018-02-07 18:23:28 +01:00
Igor Gnatenko d2cc76421f
chmod +x brp-ldconfig
Just for consistency.

Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2018-02-07 18:06:01 +01:00
Florian Weimer ddb845537c Fix typo 2018-02-05 14:40:59 +01:00
Florian Weimer fa08f0e5a1 Add RPM macros for compiler/linker flags 2018-02-04 18:00:40 +01:00
Igor Gnatenko 222670e2e7
Use newly available /usr/bin/grep
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2018-02-03 18:29:37 +01:00
Peter Robinson 07dea7d44f Use generic tuning for ARMv7 2018-01-31 09:34:18 +00:00
Jason Tibbitts 9ac5353554 Fix bad dependency on grep. 2018-01-30 20:23:24 -06:00
Miro Hrončok 00b0603754 Explicitly require stuff for brp-mangle-shebangs
Except what is in coreutils (already required)
2018-01-30 22:08:52 +01:00
Miro Hrončok 257a3a95c7 Add brp-mangle-shebangs 2018-01-30 13:31:25 +01:00
Igor Gnatenko 1591a6fbf8
Add macros.ldconfig
With https://fedoraproject.org/wiki/Changes/Removing_ldconfig_scriptlets
we try to remove ldconfig scriptlets, but it would make every package
look horrible with all those conditionals. So let's just wrap ldconfig
scriptlets into macro so it doesn't look that horrible and error-prone.

Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2018-01-30 08:23:10 +01:00
Igor Gnatenko 7a29d55964
typo: fix day of week
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2018-01-29 17:30:29 +01:00
Igor Gnatenko 12ace9bdb9 Create DSO symlinks automatically
If there are unpackaged symlinks, build will fail with unpackaged files.
People can %undefine __brp_ldconfig if they need to and they should make
sure that they call ldconfig themselves.

Right now, script doesn't guide packagers what to do, but it's not
prerequisite.

Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2018-01-29 16:41:52 +01:00
Florian Weimer 8d6c6d0761 Build flags: Disable -z defs again (#1535422) 2018-01-29 15:18:11 +01:00
Florian Weimer 1b296f01fc Build flags: Enable CET on i686, x86_64 (#1538725) 2018-01-29 15:18:11 +01:00