-
-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add: gnome-shell-extension-tailscale-status #2961
base: frawhide
Are you sure you want to change the base?
Conversation
mv %{_localstatedir}/lib/rpm-state/%{uuid}/metadata.json /home/${current_user}/.local/share/gnome-shell/extensions/%{uuid}/metadata.json | ||
mv %{_localstatedir}/lib/rpm-state/%{uuid}/extension.js /home/${current_user}/.local/share/gnome-shell/extensions/%{uuid}/extension.js | ||
mv %{_localstatedir}/lib/rpm-state/%{uuid}/prefs.js /home/${current_user}/.local/share/gnome-shell/extensions/%{uuid}/prefs.js | ||
mv %{_localstatedir}/lib/rpm-state/%{uuid}/icon-down.svg /home/${current_user}/.local/share/gnome-shell/extensions/%{uuid}/icon-down.svg | ||
mv %{_localstatedir}/lib/rpm-state/%{uuid}/icon-exit-node.svg /home/${current_user}/.local/share/gnome-shell/extensions/%{uuid}/icon-exit-node.svg | ||
mv %{_localstatedir}/lib/rpm-state/%{uuid}/icon-up.svg /home/${current_user}/.local/share/gnome-shell/extensions/%{uuid}/icon-up.svg | ||
mv %{_localstatedir}/lib/rpm-state/%{uuid}/schemas/* /home/${current_user}/.local/share/gnome-shell/extensions/%{uuid}/schemas/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not doable, you should not do this itfp
This extension is in no way affiliated with Tailscale Inc. | ||
|
||
%prep | ||
wget https://extensions.gnome.org/review/download/58475.shell-extension.zip |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you grab this from %SOURCE0
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried but it didn't like it, I'll try again.
#Since this is a User Extension, we muct only install for the current user | ||
current_user=$(logname) | ||
echo "Running post-transaction scripts as user ${current_user}..." | ||
|
||
# Create the User Extensions directories in the user's home directory | ||
mkdir -p /home/${current_user}/.local/share/gnome-shell/extensions/%{uuid} | ||
mkdir -p /home/${current_user}/.local/share/gnome-shell/extensions/%{uuid}/schemas |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
even if this is a user extension you can't just interfere with the user home directory.
dnf is a system package manager by nature and you can't just do this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, so it pretty much needs to be a system extension or can't be packaged?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
well you need to figure out a way to install user extensions in a system-wide way (a bit like user services for systemd)
%install | ||
mkdir -p %{buildroot}%{_localstatedir}/lib/rpm-state/%{uuid} | ||
mkdir -p %{buildroot}%{_localstatedir}/lib/rpm-state/%{uuid}/schemas | ||
|
||
install -Dm644 metadata.json %{buildroot}%{_localstatedir}/lib/rpm-state/%{uuid}/metadata.json | ||
install -Dm644 extension.js %{buildroot}%{_localstatedir}/lib/rpm-state/%{uuid}/extension.js | ||
install -Dm644 prefs.js %{buildroot}%{_localstatedir}/lib/rpm-state/%{uuid}/prefs.js | ||
install -Dm644 icon-down.svg %{buildroot}%{_localstatedir}/lib/rpm-state/%{uuid}/icon-down.svg | ||
install -Dm644 icon-exit-node.svg %{buildroot}%{_localstatedir}/lib/rpm-state/%{uuid}/icon-exit-node.svg | ||
install -Dm644 icon-up.svg %{buildroot}%{_localstatedir}/lib/rpm-state/%{uuid}/icon-up.svg | ||
install -Dm644 schemas/* %{buildroot}%{_localstatedir}/lib/rpm-state/%{uuid}/schemas/ | ||
|
||
%files | ||
%dir %{_localstatedir}/lib/rpm-state/%{uuid} | ||
%dir %{_localstatedir}/lib/rpm-state/%{uuid}/schemas | ||
%{_localstatedir}/lib/rpm-state/%{uuid}/metadata.json | ||
%{_localstatedir}/lib/rpm-state/%{uuid}/extension.js | ||
%{_localstatedir}/lib/rpm-state/%{uuid}/prefs.js | ||
%{_localstatedir}/lib/rpm-state/%{uuid}/icon-down.svg | ||
%{_localstatedir}/lib/rpm-state/%{uuid}/icon-exit-node.svg | ||
%{_localstatedir}/lib/rpm-state/%{uuid}/icon-up.svg | ||
%{_localstatedir}/lib/rpm-state/%{uuid}/schemas/* | ||
|
||
%post | ||
#Since this is a User Extension, we muct only install for the current user | ||
current_user=$(logname) | ||
echo "Running post-transaction scripts as user ${current_user}..." | ||
|
||
# Create the User Extensions directories in the user's home directory | ||
mkdir -p /home/${current_user}/.local/share/gnome-shell/extensions/%{uuid} | ||
mkdir -p /home/${current_user}/.local/share/gnome-shell/extensions/%{uuid}/schemas |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just do this bro
%install | |
mkdir -p %{buildroot}%{_localstatedir}/lib/rpm-state/%{uuid} | |
mkdir -p %{buildroot}%{_localstatedir}/lib/rpm-state/%{uuid}/schemas | |
install -Dm644 metadata.json %{buildroot}%{_localstatedir}/lib/rpm-state/%{uuid}/metadata.json | |
install -Dm644 extension.js %{buildroot}%{_localstatedir}/lib/rpm-state/%{uuid}/extension.js | |
install -Dm644 prefs.js %{buildroot}%{_localstatedir}/lib/rpm-state/%{uuid}/prefs.js | |
install -Dm644 icon-down.svg %{buildroot}%{_localstatedir}/lib/rpm-state/%{uuid}/icon-down.svg | |
install -Dm644 icon-exit-node.svg %{buildroot}%{_localstatedir}/lib/rpm-state/%{uuid}/icon-exit-node.svg | |
install -Dm644 icon-up.svg %{buildroot}%{_localstatedir}/lib/rpm-state/%{uuid}/icon-up.svg | |
install -Dm644 schemas/* %{buildroot}%{_localstatedir}/lib/rpm-state/%{uuid}/schemas/ | |
%files | |
%dir %{_localstatedir}/lib/rpm-state/%{uuid} | |
%dir %{_localstatedir}/lib/rpm-state/%{uuid}/schemas | |
%{_localstatedir}/lib/rpm-state/%{uuid}/metadata.json | |
%{_localstatedir}/lib/rpm-state/%{uuid}/extension.js | |
%{_localstatedir}/lib/rpm-state/%{uuid}/prefs.js | |
%{_localstatedir}/lib/rpm-state/%{uuid}/icon-down.svg | |
%{_localstatedir}/lib/rpm-state/%{uuid}/icon-exit-node.svg | |
%{_localstatedir}/lib/rpm-state/%{uuid}/icon-up.svg | |
%{_localstatedir}/lib/rpm-state/%{uuid}/schemas/* | |
%post | |
#Since this is a User Extension, we muct only install for the current user | |
current_user=$(logname) | |
echo "Running post-transaction scripts as user ${current_user}..." | |
# Create the User Extensions directories in the user's home directory | |
mkdir -p /home/${current_user}/.local/share/gnome-shell/extensions/%{uuid} | |
mkdir -p /home/${current_user}/.local/share/gnome-shell/extensions/%{uuid}/schemas | |
%install | |
mkdir -p %%{buildroot}%{_datadir}/gnome-shell/extensions/%{uuid}/schemas | |
install -Dm644 metadata.json %{buildroot}%{_datadir}/gnome-shell/extensions/%{uuid}/metadata.json | |
install -Dm644 extension.js %{buildroot}%{_datadir}/gnome-shell/extensions/%{uuid}/extension.js | |
install -Dm644 prefs.js %{buildroot}%{_datadir}/gnome-shell/extensions/%{uuid}/prefs.js | |
install -Dm644 icon-down.svg %{buildroot}%{_datadir}/gnome-shell/extensions/%{uuid}/icon-down.svg | |
install -Dm644 icon-exit-node.svg %{buildroot}%{_datadir}/gnome-shell/extensions/icon-exit-node.svg | |
install -Dm644 icon-up.svg %{buildroot}%{_datadir}/gnome-shell/extensions/%{uuid}/icon-up.svg | |
install -Dm644 schemas/* %{buildroot}%{_datadir}/gnome-shell/extensions/%{uuid}/schemas/ | |
%files | |
%dir %{_datadir}/gnome-shell/extensions/%{uuid} | |
%dir %{_datadir}/gnome-shell/extensions/%{uuid}/schemas/ | |
Needed for Taidan