Thorium Reader
npm vers rpm
Logiciels / Autres logiciels
-
- Voir le profil du membre Anonymous23
- Inscrit le : 19/03/2022
- Groupes :
-
Forgeron
Je me suis fait rouler en achetant un ebook qui n'est lisible qu'avec adobe (DRM adobe) ou Thorium Reader (DRM LCP).
Le second est dispo sous linux sous licence BSD3 https://github.com/edrlab/thorium-reader/releases/tag/v2.2.0
Il y a l'appimage mais je voudrais l'installer en dur.
Je voulais faire un rpm mais je me suis aperçu que le code utilise le gestionnaire de paquets npm.
Du coup comment faire?
Je sais que npm peut aussi sortir des rpm mais seront ils formatés pour Mageia?
Bonne journée
Dell Précision 5520 et 7810. MGA9 Mate et KDE et Librazik 4
-
- Voir le profil du membre Anonymous23
- Inscrit le : 19/03/2022
- Groupes :
-
Forgeron
SI je veux installer cela il va falloir passer sur Mageia 9
Dell Précision 5520 et 7810. MGA9 Mate et KDE et Librazik 4
-
- Voir le profil du membre Anonymous23
- Inscrit le : 19/03/2022
- Groupes :
-
Forgeron
Mais je ne sais pas encore bien quoi modifier dans le fichier spec
Édité par Anonymous23 Le 31/12/2022 à 12h08
Dell Précision 5520 et 7810. MGA9 Mate et KDE et Librazik 4

Visiteur
Visiteur
Si nodejs dans Mageia est obsolète, tu peux essayer une ancienne version de Thorium Reader.
-
- Voir le profil du membre Anonymous23
- Inscrit le : 19/03/2022
- Groupes :
-
Forgeron
J'avais déja essayé alien mais sur le point .deb recent
Dell Précision 5520 et 7810. MGA9 Mate et KDE et Librazik 4
-
- Voir le profil du membre Anonymous23
- Inscrit le : 19/03/2022
- Groupes :
-
Forgeron
Ca ne marche pas:
Code BASH :
[root@localhost tmp]# alien --to-rpm EDRLab.ThoriumReader_2.1.0_amd64.deb Warning: Skipping conversion of scripts in package edrlab.thoriumreader: postinst postrm Warning: Use the --scripts parameter to include the scripts. Package build failed. Here's the log of the command (cd edrlab.thoriumreader-2.1.0; rpmbuild --buildroot='/home/baptiste/tmp/edrlab.thoriumreader-2.1.0' -bb --target x86_64 'edrlab.thoriumreader-2.1.0-2.spec'): erreur : ligne 5 : tag vide : Summary:
De plus je préfererais une install "propre" plutôt qu'un truc bidouillé
Je réfléchis au fichier spec que cela représenterais issu de https://stackoverflow.com/questions/28842740/need-a-little-help-to-create-an-rpm-package-for-a-nodejs-app
Bonne journée
Édité par Anonymous23 Le 31/12/2022 à 16h31
Dell Précision 5520 et 7810. MGA9 Mate et KDE et Librazik 4

Yuusha Membre non connecté
-
- Voir le profil du membre Yuusha
- Inscrit le : 04/07/2017
- Groupes :
-
Modérateur
-
Administrateur
-
Forgeron
-
- Voir le profil du membre Anonymous23
- Inscrit le : 19/03/2022
- Groupes :
-
Forgeron
Dell Précision 5520 et 7810. MGA9 Mate et KDE et Librazik 4

Jybz Membre non connecté
-
- Voir le profil du membre Jybz
- Inscrit le : 10/10/2018
- Groupes :
-
Administrateur
-
Forgeron
Téléverser une image : /wiki/hebergement-de-fichiers-sur-mlo
Arch | Machine | OS |
x86_64 | lenovo x250 | mga9 |
armv7hl | bananapro | mga9 |
aarch64 | Raspberry Pi 4B | mga9 |

Visiteur
Visiteur
Sur la page github, je vois qu'il est possible de compiler un installateur pour Linux. Peut-être rpm. La version 2.0.0 utilise nodejs et npm compatibles.
Installation de Thorium Reader 2.0.0 (version 30 mai 2022) dans Mageia 8 en utilisant nodejs 14 et npm 6 :
Code BASH :
su - urpmi git nodejs npm gcc gcc-c++ make exit git clone https://github.com/edrlab/thorium-reader cd thorium-reader git checkout 431057e76ea11541b227f85839e1b163132bd9cc git submodule update --init npm install npm run package:linux
-
- Voir le profil du membre Anonymous23
- Inscrit le : 19/03/2022
- Groupes :
-
Forgeron
C'est Adobe ou Thorium...
Je vais essayer npm.
Ma première idée était de faire un rpm, je pense que si j'utilise tes commandes Artenaki je vais installer un truc qui ne sera pas listé dans le ccm et y aura il possibilité de l'enlever ensuite?
Édité par Anonymous23 Le 31/12/2022 à 16h54
Dell Précision 5520 et 7810. MGA9 Mate et KDE et Librazik 4
-
- Voir le profil du membre Anonymous23
- Inscrit le : 19/03/2022
- Groupes :
-
Forgeron
Code TEXT :
%define debug_package %{nil} # # automatically generate requires and provides from package.json # %{?nodejs_find_provides_and_requires} # # filter out any false provides created due to dependencies with native components # %{?nodejs_default_filter} # # name of zip file containing source without .tar.gz extension # %define modname thorium-reader Summary: A nodejs ebook reader Name: nodejs-%{modname} Group: Office/Utilities Version: 2.0.0 Release: 1 License: BSD3 URL: https://github.com/edrlab/thorium-reader/releases/tag/v2.0.0 Source0: %{modname}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch #ExclusiveArch: %{nodejs_arches} noarch BuildRequires: nodejs-packaging %description A nodejs app that installs Thorium Reader %prep %setup -q -n %{modname}-%{version} %build %{__rm} -f .gitignore # Fedora guidlines do not allow bundled modules # use nodejs_symlink_deps in the install section to generate # links based on package.json contents #Supposing than Mageia respcects the same principle the code is not changed %{__rm} -rf node_modules %install rm -rf $RPM_BUILD_ROOT # # copy in the module source # %{__install} -d $RPM_BUILD_ROOT%{nodejs_sitelib} %{__cp} -r $RPM_BUILD_DIR/%{modname}-%{version} $RPM_BUILD_ROOT%{nodejs_sitelib}/%{modname} # # # link in any dependent nodejs modules referenced in package.json # %nodejs_symlink_deps # # documents will be handled by %doc, so remove them from buildroot # %{__rm} -rf $RPM_BUILD_ROOT%{nodejs_sitelib}/%{modname}{CHANGELOG.md,LICENSE.md,README.md,docs} %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root) %doc CHANGELOG.md LICENSE.md README.md docs %{nodejs_sitelib}/%{modname} %changelog
et voici la réponse
Code BASH :
[ba@localhost rpmbuild]$ rpmbuild -ba SPECS/nodejs-thorium-reader.spec Exécution_de(%prep) : /bin/sh -e /home/baptiste/rpmbuild/tmp/rpm-tmp.VyfCHJ + umask 022 + cd /home/baptiste/rpmbuild//BUILD + '[' 1 -eq 1 ']' + '[' 1 -eq 1 ']' + '[' 1 -eq 1 ']' + cd /home/baptiste/rpmbuild/BUILD + rm -rf thorium-reader-2.0.0 + /usr/bin/gzip -dc /home/baptiste/rpmbuild/SOURCES/thorium-reader-2.0.0.tar.gz + /usr/bin/tar -xof - + STATUS=0 + '[' 0 -ne 0 ']' + cd thorium-reader-2.0.0 + /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w . + RPM_EC=0 ++ jobs -p + exit 0 Exécution_de(%build) : /bin/sh -e /home/baptiste/rpmbuild/tmp/rpm-tmp.Pum7sI + umask 022 + cd /home/baptiste/rpmbuild//BUILD + cd thorium-reader-2.0.0 + '[' 1 -eq 1 ']' + '[' 1 -eq 1 ']' + /usr/bin/rm -f .gitignore + /usr/bin/rm -rf node_modules + RPM_EC=0 ++ jobs -p + exit 0 Exécution_de(%install) : /bin/sh -e /home/baptiste/rpmbuild/tmp/rpm-tmp.T5DmlJ + umask 022 + cd /home/baptiste/rpmbuild//BUILD + '[' 1 -eq 1 ']' + '[' /home/baptiste/rpmbuild/BUILDROOT/nodejs-thorium-reader-2.0.0-1.x86_64 '!=' / ']' + rm -rf /home/baptiste/rpmbuild/BUILDROOT/nodejs-thorium-reader-2.0.0-1.x86_64 ++ dirname /home/baptiste/rpmbuild/BUILDROOT/nodejs-thorium-reader-2.0.0-1.x86_64 + mkdir -p /home/baptiste/rpmbuild/BUILDROOT + mkdir /home/baptiste/rpmbuild/BUILDROOT/nodejs-thorium-reader-2.0.0-1.x86_64 + cd thorium-reader-2.0.0 + '[' 1 -eq 1 ']' + rm -rf /home/baptiste/rpmbuild/BUILDROOT/nodejs-thorium-reader-2.0.0-1.x86_64 + /usr/bin/install -d /home/baptiste/rpmbuild/BUILDROOT/nodejs-thorium-reader-2.0.0-1.x86_64/usr/lib/node_modules + /usr/bin/cp -r /home/baptiste/rpmbuild//BUILD/thorium-reader-2.0.0 /home/baptiste/rpmbuild/BUILDROOT/nodejs-thorium-reader-2.0.0-1.x86_64/usr/lib/node_modules/thorium-reader + /usr/lib/rpm/nodejs-symlink-deps /usr/lib/node_modules ERROR: the path for dependency "@xmldom/xmldom" already exists This could mean that bundled modules are being installed. Bundled libraries are forbidden in Fedora. For more information, see: <https://fedoraproject.org/wiki/Packaging:No_Bundled_Libraries> It is generally reccomended to remove the entire "node_modules" directory in %prep when it exists. For more information, see: <https://fedoraproject.org/wiki/Packaging:Node.js#Removing_bundled_modules> If you have obtained permission from the Fedora Packaging Committee to bundle libraries, please use `%nodejs_fixdep -r` in %prep to remove the dependency on the bundled module. This will prevent an unnecessary dependency on the system version of the module and eliminate this error. erreur : Mauvais statut de sortie pour /home/baptiste/rpmbuild/tmp/rpm-tmp.T5DmlJ (%install) Erreur de construction de RPM : Mauvais statut de sortie pour /home/baptiste/rpmbuild/tmp/rpm-tmp.T5DmlJ (%install) [ba@localhost rpmbuild]$
J'ai le sentiment que cela serait beaucoup plus facile si je ne respecte pas cette règle de Fedora de na pas lier les dependences.
Quelle est la politique des empaqueteurs de Mageia?
Édité par Anonymous23 Le 01/01/2023 à 03h53
Dell Précision 5520 et 7810. MGA9 Mate et KDE et Librazik 4
-
- Voir le profil du membre Anonymous23
- Inscrit le : 19/03/2022
- Groupes :
-
Forgeron
::
Code TEXT :
%define debug_package %{nil} # # automatically generate requires and provides from package.json # %{?nodejs_find_provides_and_requires} # # filter out any false provides created due to dependencies with native components # %{?nodejs_default_filter} # # name of zip file containing source without .tar.gz extension # %define modname thorium-reader Summary: A nodejs ebook reader Name: nodejs-%{modname} Group: Office/Utilities Version: 2.0.0 Release: 1 License: BSD3 URL: https://github.com/edrlab/thorium-reader/releases/tag/v2.0.0 Source0: %{modname}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch #ExclusiveArch: %{nodejs_arches} noarch BuildRequires: nodejs-packaging BuildRequires: npm AutoReq: no AutoProv: no %description A nodejs app that installs Thorium Reader %prep %setup -q -n %{modname}-%{version} %build %{__rm} -f .gitignore %install rm -rf $RPM_BUILD_ROOT # # copy in the module source # %{__install} -d $RPM_BUILD_ROOT%{nodejs_sitelib} %{__cp} -r $RPM_BUILD_DIR/%{modname}-%{version} $RPM_BUILD_ROOT%{nodejs_sitelib}/%{modname} # # # npm will bundle in all dependent modules from the npm registry # (bundling is OK for private packages but not for EPEL packages) # npm cache clean --force rm -rf node_modules npm -g -q --production --prefix="${RPM_BUILD_ROOT}%{_prefix}" install # # documents will be handled by %doc, so remove them from buildroot # %{__rm} -rf $RPM_BUILD_ROOT%{nodejs_sitelib}/%{modname}{CHANGELOG.md,LICENSE.md,README.md,docs}
Mais cela buggue avant la fin:
Code TEXT :
npm WARN notsup Not compatible with your version of node/npm: r2-shared-js@1.0.65 npm WARN notsup Unsupported engine for r2-utils-js@1.0.32: wanted: {"node":">=16","npm":">=6","yarn":">=1.0"} (current: {"node":"14.21.1","npm":"6.14.17"}) npm WARN notsup Not compatible with your version of node/npm: r2-utils-js@1.0.32 npm WARN notsup Unsupported engine for r2-lcp-js@1.0.36: wanted: {"node":">=16","npm":">=6","yarn":">=1.0"} (current: {"node":"14.21.1","npm":"6.14.17"}) npm WARN notsup Not compatible with your version of node/npm: r2-lcp-js@1.0.36 npm WARN notsup Unsupported engine for r2-streamer-js@1.0.44: wanted: {"node":">=16","npm":">=8"} (current: {"node":"14.21.1","npm":"6.14.17"}) npm WARN notsup Not compatible with your version of node/npm: r2-streamer-js@1.0.44 npm WARN notsup Unsupported engine for r2-opds-js@1.0.40: wanted: {"node":">=16","npm":">=8"} (current: {"node":"14.21.1","npm":"6.14.17"}) npm WARN notsup Not compatible with your version of node/npm: r2-opds-js@1.0.40 npm WARN notsup Unsupported engine for r2-navigator-js@1.11.6: wanted: {"node":">=16","npm":">=8"} (current: {"node":"14.21.1","npm":"6.14.17"}) npm WARN notsup Not compatible with your version of node/npm: r2-navigator-js@1.11.6 npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! EDRLab.ThoriumReader@2.0.0 postinstall: `npm run pinCompromisedColorPackage && npm run electron-build` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the EDRLab.ThoriumReader@2.0.0 postinstall script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above. npm ERR! A complete log of this run can be found in: npm ERR! /home/baptiste/.npm/_logs/2023-01-01T02_47_45_316Z-debug.log erreur : Mauvais statut de sortie pour /home/baptiste/rpmbuild/tmp/rpm-tmp.xgm0O6 (%install) Erreur de construction de RPM : Mauvais statut de sortie pour /home/baptiste/rpmbuild/tmp/rpm-tmp.xgm0O6 (%install)
Édité par Anonymous23 Le 01/01/2023 à 03h54
Dell Précision 5520 et 7810. MGA9 Mate et KDE et Librazik 4
-
- Voir le profil du membre Anonymous23
- Inscrit le : 19/03/2022
- Groupes :
-
Forgeron
Code TEXT :
[ba@localhost thorium-reader ((v2.0.0))]$ npm install npm ERR! code ENOTSUP npm ERR! notsup Unsupported engine for EDRLab.ThoriumReader@2.0.0: wanted: {"node":">=16.0.0","npm":">=8.0.0"} (current: {"node":"14.21.1","npm":"6.14.17"}) npm ERR! notsup Not compatible with your version of node/npm: EDRLab.ThoriumReader@2.0.0 npm ERR! notsup Not compatible with your version of node/npm: EDRLab.ThoriumReader@2.0.0 npm ERR! notsup Required: {"node":">=16.0.0","npm":">=8.0.0"} npm ERR! notsup Actual: {"npm":"6.14.17","node":"14.21.1"} npm ERR! A complete log of this run can be found in: npm ERR! /home/baptiste/.npm/_logs/2023-01-01T03_04_06_691Z-debug.l
Dell Précision 5520 et 7810. MGA9 Mate et KDE et Librazik 4

Visiteur
Visiteur
Anonymous23 :
je pense que si j'utilise tes commandes Artenaki je vais installer un truc qui ne sera pas listé dans le ccm et y aura il possibilité de l'enlever ensuite?
D'après ce que j'ai compris de la description de github et de mon expérience, la commande "npm install" ne fait que compiler l'application dans le dossier local ~/thorium-reader (avec les dépendances de construction téléchargées depuis Internet), rien n'est installé dans le système. La commande "npm run package:linux" devrait générer des fichiers .deb (ou peut-être .rpm), ceux-ci devraient apparaître quelque part dans le dossier de construction (~/thorium-reader/*). Ces commandes n'installent rien sur le système, et elles n'ont pas les autorisations root.
Tu peux aussi démarrer l'application depuis le dossier ~/thorium-reader avec la commande "cd ~/thorium-reader && npm run start". Mais il n'est pas très pratique de conserver le dossier ~/thorium-reader car il contient aussi des fichiers de construction inutiles.
La commande "npm run package:linux" devrait créer des fichiers .deb, ou peut-être .rpm. Mais si seuls les .deb seront créés, tu peux à nouveau utiliser l'utilitaire alien, peut-être avec plus de chance cette fois.
Créer une spec pour le npm est assez difficile, je trouve. Essaie d'abord la méthode officielle.
Répondre
Vous n'êtes pas autorisé à écrire dans cette catégorie