Blame SPECS/copy-jdk-configs.spec

950ebc
%global project copy_jdk_configs
950ebc
%global file %{project}.lua
950ebc
%global fixFile %{project}_fixFiles.sh
950ebc
%global rpm_state_dir %{_localstatedir}/lib/rpm-state
950ebc
950ebc
Name:    copy-jdk-configs
950ebc
950ebc
# hash relevant to version tag
cccebf
%global  htag 88d3ed89f30d8b0eb4877d860fa8d951f224f156
cccebf
Version: 4.0
cccebf
Release: 2%{?dist}
950ebc
Summary: JDKs configuration files copier
950ebc
950ebc
License:  BSD
950ebc
URL:      https://pagure.io/%{project}
950ebc
Source0:  %{URL}/blob/%{htag}/f/%{file}
950ebc
Source1:  %{URL}/blob/%{htag}/f/LICENSE
950ebc
Source2:  %{URL}/blob/%{htag}/f/%{fixFile}
950ebc
950ebc
# we need to duplicate msot of the percents in that script so they survive rpm expansion (even in that sed they have to be duplicated)
950ebc
%global pretrans_install %(cat %{SOURCE0} | sed s/%%/%%%%/g | sed s/\\^%%%%/^%%/g) 
950ebc
950ebc
BuildArch: noarch
950ebc
950ebc
Requires: lua
950ebc
#Requires: lua-posix
cccebf
# rh1965305 - copy-jdk-configs script uses find and xargs but RPM does not depend on them
cccebf
Requires: findutils
cccebf
OrderWithRequires: findutils
950ebc
950ebc
%description
950ebc
Utility script to transfer JDKs configuration files between updates or for
950ebc
archiving. With script to fix incorrectly created rpmnew files
950ebc
950ebc
%prep
950ebc
cp -a %{SOURCE1} .
950ebc
950ebc
950ebc
%build
950ebc
#blob
950ebc
950ebc
%pretrans -p <lua>
950ebc
function createPretransScript()
950ebc
-- the sript must be available during pretrans, so multiply it to tmp
950ebc
  os.execute("mkdir -p %{rpm_state_dir}")
950ebc
  temp_path="%{rpm_state_dir}/%{file}"
950ebc
-- print("generating " .. temp_path)
950ebc
  file = io.open(temp_path, "w")
950ebc
  file:write([[%{pretrans_install}]])
950ebc
  file:close()
950ebc
end
950ebc
950ebc
-- in netinst, the above call may fail. pcall should save instalation (as there is nothing to copy anyway)
950ebc
-- https://bugzilla.redhat.com/show_bug.cgi?id=1295701
950ebc
-- todo, decide whether to check for {rpm_state_dir} and skip on not-existing, or keep creating
950ebc
if pcall(createPretransScript) then
950ebc
-- ok
950ebc
else
950ebc
--  print("Error running %{name} pretrans.")
950ebc
end
950ebc
950ebc
%install
950ebc
mkdir -p $RPM_BUILD_ROOT/%{_libexecdir}
cccebf
cp -a %{SOURCE0} $RPM_BUILD_ROOT/%{_libexecdir}/%{file}
950ebc
chmod 644 $RPM_BUILD_ROOT/%{_libexecdir}/%{file}
950ebc
cp -a %{SOURCE2} $RPM_BUILD_ROOT/%{_libexecdir}/%{fixFile}
950ebc
950ebc
%posttrans
950ebc
# remove file created in pretrans
950ebc
# echo "removing %{rpm_state_dir}/%{file}" || :
950ebc
rm "%{rpm_state_dir}/%{file}" 2> /dev/null || :
950ebc
950ebc
%files 
950ebc
%{_libexecdir}/%{file}
950ebc
%{_libexecdir}/%{fixFile}
950ebc
%license LICENSE
950ebc
950ebc
%changelog
cccebf
* Tue Jun 08 2021 Jiri Vanek <jvanek@redhat.com> - 4.0-2
cccebf
- commented out requires lua-posix, it was always commented out in el8, never in fedora. IDK
cccebf
- Resolves: rhbz#1953923
cccebf
cccebf
* Tue Jun 08 2021 Jiri Vanek <jvanek@redhat.com> - 4.0-1
cccebf
- rebased to 4.0
cccebf
- Resolves: rhbz#1953923
cccebf
cb946a
* Thu Jul 09 2020 Jiri Vanek <jvanek@redhat.com> - 3.7-3
cb946a
- added link to http://hydra.brq.redhat.com:8080/view/c~j~c/#projectstatus
cb946a
- removed source check from test.yaml
cb946a
- added gating.yaml
cb946a
- Resolves: rhbz#1855374
cb946a
cb946a
* Thu Jul 09 2020 Jiri Vanek <jvanek@redhat.com> - 3.7-3
cb946a
- added gatnig placeholder
cb946a
- Resolves: rhbz#1855374
cb946a
cb946a
* Thu Jul 09 2020 Jiri Vanek <jvanek@redhat.com> - 3.7-2
cb946a
- added nss.fips.cfg to cared files
cb946a
- Resolves: rhbz#1855374
cb946a
950ebc
* Wed May 02 2018 Jiri Vanek <jvanek@redhat.com> - 3.7-1
950ebc
- udpated to latst relase
950ebc
- configurable blacklist
950ebc
- listed all java keystores
950ebc
950ebc
* Wed May 02 2018 Jiri Vanek <jvanek@redhat.com> - 3.3-12
950ebc
- blackidrs put on single line
950ebc
950ebc
* Wed May 02 2018 Jiri Vanek <jvanek@redhat.com> - 3.3-11
950ebc
- added more files to balcklist based on oralce and ibm jdks
950ebc
950ebc
* Mon Apr 30 2018 Jiri Vanek <jvanek@redhat.com> - 3.3-10
950ebc
- added javaws.policy and blacklist
950ebc
- fixed rhbz#1541838
950ebc
950ebc
* Tue Apr 03 2018 Jiri Vanek <jvanek@redhat.com> - 3.3-5
950ebc
- fixed rhbz#1541838
950ebc
950ebc
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.3-3
950ebc
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
950ebc
950ebc
* Wed Oct 18 2017 Jiri Vanek <jvanek@redhat.com> - 3.3-2
950ebc
- added another subdirs for policies files
950ebc
950ebc
* Wed Oct 18 2017 Jiri Vanek <jvanek@redhat.com> - 3.3-1
950ebc
- handled new paths for policies files
950ebc
950ebc
* Thu Oct 05 2017 Jiri Vanek <jvanek@redhat.com> - 3.1-1
950ebc
- moved to newest release 3.1 whcih conf and lib/security as directories
950ebc
950ebc
* Thu Oct 05 2017 Jiri Vanek <jvanek@redhat.com> - 3.0-1
950ebc
- moved to newest release 3.0 whcih support linked configs
950ebc
950ebc
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.3-2
950ebc
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
950ebc
950ebc
* Wed Feb 22 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.3
950ebc
- updated to latest head
950ebc
950ebc
* Wed Feb 22 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.2
950ebc
- added "jre/lib/security/blacklisted.certs" to cared files
950ebc
950ebc
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.1-2
950ebc
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
950ebc
950ebc
* Fri Feb 03 2017 Jiri Vanek <jvanek@redhat.com> - 2.1-1
950ebc
- moved to newest release 2.1
950ebc
950ebc
* Fri Jan 20 2017 Jiri Vanek <jvanek@redhat.com> - 2.0-1
950ebc
- moved to new upstream at pagure.io
950ebc
- moved to newest release 2.0
950ebc
- added new script of copy_jdk_configs_fixFiles.sh 
950ebc
- copy_jdk_configs.lua  aligned to it
950ebc
950ebc
* Tue Aug 09 2016 Jiri Vanek <jvanek@redhat.com> - 1.2-1
950ebc
- updated to 1,3 which fixing nss minor issue
950ebc
950ebc
* Tue Jul 12 2016 Jiri Vanek <jvanek@redhat.com> - 1.1-5
950ebc
- posttrans silenced, the error is appearing only in state, when there is nothing to copy
950ebc
950ebc
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.1-4
950ebc
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
950ebc
950ebc
* Fri Jan 08 2016 Jiri Vanek <jvanek@redhat.com> - 1.1-3
950ebc
- pretrasn lua call now done in pcall (protected call)
950ebc
- also posttrans now always return 0
950ebc
950ebc
* Wed Dec 16 2015 Jiri Vanek <jvanek@redhat.com> - 1.1-2
950ebc
- package now "installs" also during pretrans, so pretrasn scripts can use it
950ebc
- pretrasn "install" is removed in postrans
950ebc
950ebc
* Wed Nov 25 2015 Jiri Vanek <jvanek@redhat.com> - 1.1-1
950ebc
- initial package