PapirusDevelopmentTeam / papirus-icon-theme

Pixel perfect icon theme for Linux
https://git.io/papirus-icon-theme
GNU General Public License v3.0
6.65k stars 423 forks source link

Fedora Packages #358

Closed dirkdavidis closed 7 years ago

dirkdavidis commented 7 years ago

Hi i have created an initial Package for Fedora 25 and EPEL based on the OBS packages for openSUSE. i will shortly update and modify it. But for now it is working ;-).

You can activate the repository with: dnf copr enable dirkdavidis/papirus-icon-theme

cheers

Dirk Davidis

SmartFinn commented 7 years ago

Awesome :+1:

Please add Fedora 24 too.

Here are a couple suggestions how to improve your spec file:

change Licence and Release:

Release: 1%{?dist}
License: LGPLv3

change description:

Papirus is a free and open source SVG icon theme for Linux, based on Paper Icon Set with a lot of new icons and a few extras, like Hardcode-Tray support, KDE colorscheme support, Folder Color support, and others.

This package contains the following icon themes:
 - ePapirus
 - Papirus
 - Papirus-Dark
 - Papirus-Light

and replace %install to:

%install
make install DESTDIR=%{buildroot}

also, can add Description and Installation Instructions on the copr page.

Thank you.

CC @KottV

SmartFinn commented 7 years ago

@dirkdavidis could you make a package for papirus-libreoffice-theme? Here an example, patch not needed anymore.

dirkdavidis commented 7 years ago

Hi ok i will update the spec add fedora 24 and yes i can to the libreoffice theme as well give me some hours it is finished today

SmartFinn commented 7 years ago

@dirkdavidis I got the warning during install in Korora 25:

screenshot from 2017-02-27 12-38-58

I suppose that lines not needed:

%post
%icon_theme_cache_post ePapirus
%icon_theme_cache_post Papirus
%icon_theme_cache_post Papirus-Light
%icon_theme_cache_post Papirus-Dark
%ghost %{_datadir}/icons/ePapirus/icon-theme.cache
%ghost %{_datadir}/icons/Papirus/icon-theme.cache
%ghost %{_datadir}/icons/Papirus-Light/icon-theme.cache
%ghost %{_datadir}/icons/Papirus-Dark/icon-theme.cache

also, you forget to remove the lines:

cp --no-preserve=mode,ownership -r \
  "ePapirus" \
  "Papirus" \
  "Papirus-Light" \
  "Papirus-Dark" %{buildroot}%{_datadir}/icons/
dirkdavidis commented 7 years ago

Hi, thanks i have updated the .spec and a new build is starting right now @copr. I had some issue with fedora 24 build need to investigate later what is the issue with f24.

dirkdavidis commented 7 years ago

Status: new build with the fixes uploaded and succeeded. F24/F25/F26 and EPEL7

dirkdavidis commented 7 years ago

i am starting now with the libreoffice builds...

SmartFinn commented 7 years ago

@dirkdavidis no warning now, but cache files for icon themes are missing as before. It's a problem. I try to find a solution.

dirkdavidis commented 7 years ago

@SmartFinn i saw it ... i am trying as well ... i think maybe i can include a rebuild for the cache files after update ?

dirkdavidis commented 7 years ago

%post touch --no-create %{_datadir}/icons/hicolor || : %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :

%postun touch --no-create %{_datadir}/icons/hicolor || : %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :

i am using like this one

SmartFinn commented 7 years ago

@dirkdavidis I found this too https://fedoraproject.org/wiki/Packaging:Scriptlets#Icon_Cache

It's so ugly...

dirkdavidis commented 7 years ago

@SmartFinn yes i know ugly but working ;-) i have done a local build and now it is working icon cache is there ... i will rebuild on copr ...

dirkdavidis commented 7 years ago

@SmartFinn please check new build there

SmartFinn commented 7 years ago

@dirkdavidis had problems with uninstall and reinstall, try this spec file https://gist.github.com/SmartFinn/63f91b5c67571d346cfa8e97a2426572

dirkdavidis commented 7 years ago

@SmartFinn have just uploaded for a new build on copr lets see

dirkdavidis commented 7 years ago

Hi there is a gap at the moment on copr.fedoraproject.org with builds i have three new builds pending for papirus at the moment ... they are pending for 108 minutes latest ... please wait some time ... the queue is full of build requests ...

SmartFinn commented 7 years ago

@dirkdavidis Hi, spec file for the libreoffice theme at here https://gist.github.com/bbba0c198e6a7843b5a47bc338e1a2b7

Installation paths should be different for i686 and x86_64:

/usr/lib{,64}/libreoffice/share/config
dirkdavidis commented 7 years ago

@SmartFinn I am working on it

SmartFinn commented 7 years ago

@dirkdavidis please, test the spec file above, it should works. I use %{_libdir} to solve the paths problem.

SmartFinn commented 7 years ago

@dirkdavidis I tested the papirus-icon-theme package and it works fine :+1:

KottV commented 7 years ago

great, nobody told that my libreoffice-icon-theme-papirus rpm doesn't work :)

now it fixed, there must be links /usr/lib[64] I didn't caught, because I have had these link already before

SmartFinn commented 7 years ago

@KottV а зачем так с патчами мучатся? Я кстати новый релиз сделал с другим Makefile, так что после апдейта он бы сломался, не проще ли прямо в секции %install симлинки создавать, можно даже с правильным абсолютным путем.

KottV commented 7 years ago

да можно, надо глянуть как другие темы собирают

SmartFinn commented 7 years ago

@KottV я уже смотрел, известные темы уже в libreoffice добавлены, а он одним монолитом собирается и не особо понятно как, но факт в том что в готовом пакете с темой только zip, симлинк наверное post-install`ом добавляется...

KottV commented 7 years ago

там макрос внутри спека, нам он не подходит :) подумаю пока так работает, но согласен, что неправильно это, как минимум для других архитектур

SmartFinn commented 7 years ago

@KottV в пакете papirus-icon-theme поменяй еще лицензию на LGPL-3.0 и под make переделай пожалуйста.

UPD: и зависимости для сборки там тоже лишние, можно все снести кроме automake.

KottV commented 7 years ago

лицензию поменял, остальное позже

KottV commented 7 years ago

вот что генерируется из макроса:

postuninstall scriptlet (using /bin/sh):
if [ "$1" = "0" -a -f /usr/share/libreoffice/icon-theme-galaxy_list.txt -a -x /usr/bin/libreoffice-share-linker ]; then
    /usr/bin/libreoffice-share-linker --unlink /usr/share/libreoffice/icon-theme-galaxy_list.txt || true
    rm -f /usr/share/libreoffice/icon-theme-galaxy_list.txt 2> /dev/null || true
fi
posttrans scriptlet (using /bin/sh):
rpm -ql libreoffice-icon-theme-galaxy > /usr/share/libreoffice/icon-theme-galaxy_list.txt || true
if [ -f /usr/share/libreoffice/icon-theme-galaxy_list.txt ] ; then
    /usr/bin/libreoffice-share-linker /usr/share/libreoffice/icon-theme-galaxy_list.txt || true
fi

но это тоже уже не сегодня попробую

dirkdavidis commented 7 years ago

Ok i can't follow your discussion ;-)

dirkdavidis commented 7 years ago

@SmartFinn: The libdir is not working ... it tried to build the package on f25 64Bit but: Directory not found: /home/ladministrator/rpmbuild/BUILDROOT/libreoffice-style-papirus-20170228-1.fc25.x86_64/usr/lib64/libreoffice/share/config

dirkdavidis commented 7 years ago

@SmartFinn when i look into the BUILDROOT Directory it has: usr/lib/ .... so even if i try to specify the correct arch it is not working

SmartFinn commented 7 years ago

@dirkdavidis

Directory not found: /home/ladministrator/rpmbuild/BUILDROOT/libreoffice-style-papirus-20170228-1.fc25.x86_64/usr/lib64/libreoffice/share/config

It's weird because Makefile has the line:

install -dpm 755 $(DESTDIR)$(PREFIX)/libreoffice/share/config

I'll try to build the package on OSB later.

dirkdavidis commented 7 years ago

@SmartFinn: there is something weird on redhat based systems ... when i am using this spec file it creates BUILDROOT/usr/lib/libreoffice ... even if i specify rpmbuild --target ... no change

SmartFinn commented 7 years ago

@dirkdavidis correct spec file at https://gist.github.com/SmartFinn/bbba0c198e6a7843b5a47bc338e1a2b7

Build succeeded https://build.opensuse.org/package/show/home:SmartFinn/libreoffice-style-papirus

dirkdavidis commented 7 years ago

Ok first build on copr now working for f24 and f25 in 386 and 64 bit ...

https://copr.fedorainfracloud.org/coprs/dirkdavidis/papirus-libreoffice-theme/

SmartFinn commented 7 years ago

@dirkdavidis Thank you for your patience.

KottV commented 7 years ago

added posttrans and postun scripts, got rid of ln -s fixed: https://github.com/PapirusDevelopmentTeam/papirus-icon-theme/issues/358#issuecomment-283041727

SmartFinn commented 7 years ago

@KottV Привет.

Проверил, Все работает :+1:

Может лучше удалить неактуальные пакеты? Они даже меня путают.

screenshot from 2017-03-01 10-56-15

dirkdavidis commented 7 years ago

I have build a new package version of papirus-icon-theme for fedora. do i need to remove the old icons before installing a new set?

dirkdavidis commented 7 years ago

@SmartFinn i got errors while updating ... kollision of files ... so i need first uninstall the old version and then install the new package

SmartFinn commented 7 years ago

@dirkdavidis do you mean remove package before an upgrade? Actually no, but I had some problems with upgrade deb packages too #370 and added pre-install script after that https://github.com/PapirusDevelopmentTeam/papirus-icon-theme/commit/c7f3c87bf46631147d388d6bb056a35153a214d2

dirkdavidis commented 7 years ago

@SmartFinn ok i changed the spec file there is now a pre script that deletes the old icons while doing update... it is now working ...

SmartFinn commented 7 years ago

@dirkdavidis I saw what you did. Better use this:

# Removes symbolic links before installing/upgrading the package
%pre
find /usr/share/icons/ePapirus      -type l -delete || :
find /usr/share/icons/Papirus       -type l -delete || :
find /usr/share/icons/Papirus-Dark  -type l -delete || :
find /usr/share/icons/Papirus-Light -type l -delete || :

The command doesn't killing SSD and doesn't load HDD too much.

dirkdavidis commented 7 years ago

ok will change this later and build a new version

dirkdavidis commented 7 years ago

@SmartFinn : Hi i build a new version including Adapta ...

Build went fine but when i want to update there is an transaction issue: with Papirus-Dark/panel in 2222 and 2424 ... but i dont find the issue:

%pre rm -rf %{_datadir}/icons/ePapirus &>/dev/null || : rm -rf %{_datadir}/icons/ePapirus &>/dev/null || : rm -rf %{_datadir}/icons/Papirus-Dark &>/dev/null || : rm -rf %{_datadir}/icons/Papirus-Light &>/dev/null || : rm -rf %{_datadir}/icons/Papirus-Adapta &>/dev/null || :

%post /bin/touch --no-create %{_datadir}/icons/ePapirus &>/dev/null || : /bin/touch --no-create %{_datadir}/icons/Papirus &>/dev/null || : /bin/touch --no-create %{_datadir}/icons/Papirus-Dark &>/dev/null || : /bin/touch --no-create %{_datadir}/icons/Papirus-Light &>/dev/null || : /bin/touch --no-create %{_datadir}/icons/Papirus-Adapta &>/dev/null || :

%postun if [ $1 -eq 0 ] ; then /bin/touch --no-create %{_datadir}/icons/ePapirus &>/dev/null || : /bin/touch --no-create %{_datadir}/icons/Papirus &>/dev/null || : /bin/touch --no-create %{_datadir}/icons/Papirus-Dark &>/dev/null || : /bin/touch --no-create %{_datadir}/icons/Papirus-Light &>/dev/null || : /bin/touch --no-create %{_datadir}/icons/Papirus-Adapta &>/dev/null || : %{_bindir}/gtk-update-icon-cache -q %{_datadir}/icons/ePapirus || : %{_bindir}/gtk-update-icon-cache -q %{_datadir}/icons/Papirus || : %{_bindir}/gtk-update-icon-cache -q %{_datadir}/icons/Papirus-Light || : %{_bindir}/gtk-update-icon-cache -q %{_datadir}/icons/Papirus-Dark || : %{_bindir}/gtk-update-icon-cache -q %{_datadir}/icons/Papirus-Adapta || : fi

%posttrans %{_bindir}/gtk-update-icon-cache -q %{_datadir}/icons/ePapirus || : %{_bindir}/gtk-update-icon-cache -q %{_datadir}/icons/Papirus || : %{_bindir}/gtk-update-icon-cache -q %{_datadir}/icons/Papirus-Light || : %{_bindir}/gtk-update-icon-cache -q %{_datadir}/icons/Papirus-Dark || : %{_bindir}/gtk-update-icon-cache -q %{_datadir}/icons/Papirus-Adapta || :

%files %defattr(-,root,root) %doc LICENSE README.md %{_datadir}/icons/ePapirus %{_datadir}/icons/Papirus %{_datadir}/icons/Papirus-Dark %{_datadir}/icons/Papirus-Light %{_datadir}/icons/Papirus-Adapta %ghost %{_datadir}/icons/ePapirus/icon-theme.cache %ghost %{_datadir}/icons/Papirus/icon-theme.cache %ghost %{_datadir}/icons/Papirus-Dark/icon-theme.cache %ghost %{_datadir}/icons/Papirus-Light/icon-theme.cache %ghost %{_datadir}/icons/Papirus-Adapta/icon-theme.cache

these are the section from spec file .. what i am doing wrong?

maybe u can see it

SmartFinn commented 7 years ago

@dirkdavidis Hi.

I know what happened, I fixed it in this way https://github.com/PapirusDevelopmentTeam/papirus-icon-theme/blob/packaging/debian/preinst#L50 but I don't know why you still get the error, the line rm -rf %{_datadir}/icons/Papirus-Dark &>/dev/null || : in %pre should solve it, but she doesn't. Give me time to research...

dirkdavidis commented 7 years ago

i have looked several times the only difference between last build and this one is, that i append the Adapta Icons ... thats all ... just added the proper lines ... finished.

SmartFinn commented 7 years ago

@dirkdavidis It's because we replaced directories Papirus-Dark/22x22/panel and Papirus-Dark/24x24/panel to symlinks. I don't know how to fix it. The commands in %pre execute after Transaction check, so they are useless.

SmartFinn commented 7 years ago

@dirkdavidis hey, probably I resolved it. Just change %pre to %pretrans, build and try to upgrade.

SmartFinn commented 7 years ago

@dirkdavidis here is spec file what I used https://build.opensuse.org/package/view_file/home:SmartFinn:branches:home:kill_it/papirus-icon-theme/papirus-icon-theme.spec?expand=1