[yast-devel] Moving from *.spec.in to *.spec
![](https://seccdn.libravatar.org/avatar/654c5b4f0d657240edff9440a901839b.jpg?s=120&d=mm&r=g)
[ This change was already done some time ago, I just forgot to announce it. This announcement is mainly important for the community developers. ] Introduction ------------ For SLE12/openSUSE-13.2 we switched from *.spec.in files (which were processed by "create-spec" script from devtools during "make package-local") to directed *.spec stored in Git. This is needed because of the new CI integration (it uses "osc build" as a backend for testing build and we need an easy way to get *.spec, the old way was too complicated). This will also make the future maintenance easier, now for generating the *.spec for SLE11 you need SLE11 devtools which is the most tricky part when preparing a maintenance update. With *.spec files stored directly in Git this problem is gone... Moving from *.spec.in to *.spec -------------------------------- The *.spec.in files provided a flexibility by using some macros which were expanded by "create-spec". To keep this flexibility we moved the shared code to RPM macros [1] which is a clean and standard RPM way. I did the move for most of Yast packages (I skipped the unmaintained/obsolete ones), but some 3rd party modules will be missing the transition so here is a quick HowTo: - move *.spec.in to package/*.spec - replace the @MACROS@: - @HEADER-COMMENT@ and @HEADER@: replace by the content generated by "create-spec", look at the generated *.spec or see the generator[2] - the rest should be replaced by the respective RPM tag and an Yast RPM macro, see the example in yast2 [3] - replace the macros also in the %files section (again, see the example) - @CLEAN@ can be removed (not needed) - update the BuildRequires dependency to "yast2-devtools >= 3.0.6" (contains the new RPM macros) (You could simply use the *.spec generated by "create-spec" script but that's not recommended, it will miss some future changes as the RPM macros can be updated in the future.) If you have any questions or problems with transition in your module then just ask. [1] https://github.com/yast/yast-devtools/blob/master/build-tools/rpm/macros.yas... [2] https://github.com/yast/yast-devtools/blob/openSUSE-13_1/devtools/bin/create... [3] https://github.com/yast/yast-yast2/commit/e0a77efcfa4feb16dfb2c88779f313b9e0... -- Ladislav Slezák Appliance department / YaST Developer Lihovarská 1060/12 190 00 Prague 9 / Czech Republic tel: +420 284 028 960 lslezak@suse.com SUSE -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org To contact the owner, e-mail: yast-devel+owner@opensuse.org
participants (1)
-
Ladislav Slezak