π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
[auth] Fix fedora builds (#7835)
Prateek Sunalf740d98e1122
diff --git a/.github/workflows/auth-beta-release.yml b/.github/workflows/auth-beta-release.ymlindex bf8e68b6f5..a364190ab9 100644--- a/.github/workflows/auth-beta-release.yml+++ b/.github/workflows/auth-beta-release.yml@@ -186,6 +186,10 @@ jobs:sudo apt-get install -y libsecret-1-dev libsodium-dev libfuse2 ninja-build libgtk-3-dev dpkg-dev pkg-config rpm patchelf libsqlite3-dev locate libayatana-appindicator3-dev libffi-dev libtiff5 xz-utils libarchive-tools libcurl4-openssl-devsudo updatedb --localpaths='/usr/lib/x86_64-linux-gnu'+ - name: Install fpm for RPM packaging+ run: |+ sudo gem install fpm+- name: Install appimagetoolrun: |wget -O appimagetool "https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-x86_64.AppImage"@@ -195,11 +199,13 @@ jobs:- name: Build desktop apprun: |flutter config --enable-linux-desktop- dart pub global activate --source git https://github.com/ente-io/flutter_distributor_fork --git-ref develop --git-path packages/flutter_distributor- # RPM- flutter_distributor package --platform=linux --targets=rpm --skip-clean- mv dist/**/*-*-linux.rpm artifacts/ente-auth-v${{ env.VERSION_NAME }}-beta-x86_64.rpm+ # Build Linux app+ flutter build linux --release+ # RPM - using custom build script+ ./linux/packaging/build_rpm.sh+ mv dist/*/*.rpm artifacts/ente-auth-v${{ env.VERSION_NAME }}-beta-x86_64.rpm# APPIMAGE+ dart pub global activate --source git https://github.com/ente-io/flutter_distributor_fork --git-ref develop --git-path packages/flutter_distributorflutter_distributor package --platform=linux --targets=appimage --skip-cleanmv dist/**/*-*-linux.AppImage artifacts/ente-auth-v${{ env.VERSION_NAME }}-beta-x86_64.AppImage# DEBdiff --git a/.github/workflows/auth-release.yml b/.github/workflows/auth-release.ymlindex ce0f78790b..e1b8639603 100644--- a/.github/workflows/auth-release.yml+++ b/.github/workflows/auth-release.yml@@ -146,6 +146,10 @@ jobs:sudo apt-get install -y libsecret-1-dev libsodium-dev libfuse2 ninja-build libgtk-3-dev dpkg-dev pkg-config rpm patchelf libsqlite3-dev locate libayatana-appindicator3-dev libffi-dev libtiff5 xz-utils libarchive-tools libcurl4-openssl-devsudo updatedb --localpaths='/usr/lib/x86_64-linux-gnu'+ - name: Install fpm for RPM packaging+ run: |+ sudo gem install fpm+- name: Install appimagetoolrun: |wget -O appimagetool "https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-x86_64.AppImage"@@ -155,11 +159,13 @@ jobs:- name: Build desktop apprun: |flutter config --enable-linux-desktop- dart pub global activate --source git https://github.com/ente-io/flutter_distributor_fork --git-ref develop --git-path packages/flutter_distributor- # RPM- flutter_distributor package --platform=linux --targets=rpm --skip-clean- mv dist/**/*-*-linux.rpm artifacts/ente-${{ github.ref_name }}-x86_64.rpm+ # Build Linux app+ flutter build linux --release+ # RPM - using custom build script+ ./linux/packaging/build_rpm.sh+ mv dist/*/*.rpm artifacts/ente-${{ github.ref_name }}-x86_64.rpm# APPIMAGE+ dart pub global activate --source git https://github.com/ente-io/flutter_distributor_fork --git-ref develop --git-path packages/flutter_distributorflutter_distributor package --platform=linux --targets=appimage --skip-cleanmv dist/**/*-*-linux.AppImage artifacts/ente-${{ github.ref_name }}-x86_64.AppImage# DEBdiff --git a/mobile/apps/auth/linux/packaging/build_rpm.sh b/mobile/apps/auth/linux/packaging/build_rpm.shnew file mode 100755index 0000000000..ef8f9ab6b7--- /dev/null+++ b/mobile/apps/auth/linux/packaging/build_rpm.sh@@ -0,0 +1,121 @@+#!/bin/bash++set -e++# Colors for output+RED='\033[0;31m'+GREEN='\033[0;32m'+YELLOW='\033[1;33m'+NC='\033[0m' # No Color++echo -e "${GREEN}Building Ente Auth RPM package${NC}"++# Get script directory (location of this script)+SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"+PROJECT_ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)"++cd "$PROJECT_ROOT"++# Extract version from pubspec.yaml+FULL_VERSION=$(grep -E "^version:" pubspec.yaml | cut -d' ' -f2)+VERSION=$(echo "$FULL_VERSION" | cut -d'+' -f1)+if [ -z "$VERSION" ]; then+ echo -e "${RED}Error: Could not extract version from pubspec.yaml${NC}"+ exit 1+fi++echo -e "${YELLOW}Full Version: ${FULL_VERSION}${NC}"+echo -e "${YELLOW}RPM Version: ${VERSION}${NC}"++# Define directories+STAGING_DIR="dist/rpm-staging"+OUTPUT_DIR="dist/$FULL_VERSION"+BUNDLE_DIR="build/linux/x64/release/bundle"++# Clean up any existing staging directory+if [ -d "$STAGING_DIR" ]; then+ echo -e "${YELLOW}Cleaning existing staging directory...${NC}"+ rm -rf "$STAGING_DIR"+fi++# Create staging directories+echo -e "${YELLOW}Creating staging directories...${NC}"+mkdir -p "$STAGING_DIR/usr/share/enteauth"+mkdir -p "$STAGING_DIR/usr/share/metainfo"+mkdir -p "$STAGING_DIR/usr/share/pixmaps"+mkdir -p "$STAGING_DIR/usr/share/applications"+mkdir -p "$STAGING_DIR/usr/bin"++# Create output directory+mkdir -p "$OUTPUT_DIR"++# Verify build directory exists+if [ ! -d "$BUNDLE_DIR" ]; then+ echo -e "${RED}Error: Build directory not found at $BUNDLE_DIR${NC}"+ echo -e "${YELLOW}Please run 'flutter build linux --release' first${NC}"+ exit 1+fi++# Copy Flutter build files+echo -e "${YELLOW}Copying Flutter build files...${NC}"+cp -r "$BUNDLE_DIR"/* "$STAGING_DIR/usr/share/enteauth/"++# Copy metainfo file+echo -e "${YELLOW}Copying metainfo file...${NC}"+cp linux/packaging/enteauth.appdata.xml "$STAGING_DIR/usr/share/metainfo/"++# Copy icon+echo -e "${YELLOW}Copying icon...${NC}"+cp "$BUNDLE_DIR/data/flutter_assets/assets/icons/auth-icon.png" "$STAGING_DIR/usr/share/pixmaps/enteauth.png"++# Copy desktop file+echo -e "${YELLOW}Copying desktop file...${NC}"+cp linux/packaging/enteauth.desktop "$STAGING_DIR/usr/share/applications/"++# Create symlink+echo -e "${YELLOW}Creating symlink...${NC}"+ln -s /usr/share/enteauth/enteauth "$STAGING_DIR/usr/bin/enteauth"++# Check if fpm is installed+if ! command -v fpm &> /dev/null; then+ echo -e "${RED}Error: fpm is not installed${NC}"+ echo -e "${YELLOW}Install it with: gem install fpm${NC}"+ exit 1+fi++# Build RPM package+echo -e "${YELLOW}Building RPM package...${NC}"+fpm -s dir -t rpm \+ -n enteauth \+ -v "$VERSION" \+ --vendor "Ente.io" \+ --maintainer "Ente.io Developers <[email protected]>" \+ --license "AGPLv3" \+ --url "https://github.com/ente-io/ente" \+ --description "2FA app with free end-to-end encrypted backup and sync" \+ --category "Application/Utility" \+ --depends sqlite-libs \+ --depends libsecret \+ --depends libappindicator \+ -C "$STAGING_DIR" \+ -p "$OUTPUT_DIR/enteauth-VERSION.ARCH.rpm" \+ .++# Clean up staging directory+echo -e "${YELLOW}Cleaning up staging directory...${NC}"+rm -rf "$STAGING_DIR"++# Display success message+RPM_FILE=$(ls "$OUTPUT_DIR"/enteauth-*.rpm 2>/dev/null | head -n1)+if [ -f "$RPM_FILE" ]; then+ RPM_SIZE=$(du -h "$RPM_FILE" | cut -f1)+ echo -e "${GREEN}β RPM package created successfully!${NC}"+ echo -e "${GREEN} Location: $RPM_FILE${NC}"+ echo -e "${GREEN} Size: $RPM_SIZE${NC}"+ echo ""+ echo -e "${YELLOW}Install with:${NC}"+ echo -e " sudo rpm -ivh $RPM_FILE"+else+ echo -e "${RED}Error: RPM package not found${NC}"+ exit 1+fidiff --git a/mobile/apps/auth/linux/packaging/enteauth.desktop b/mobile/apps/auth/linux/packaging/enteauth.desktopnew file mode 100644index 0000000000..e536012482--- /dev/null+++ b/mobile/apps/auth/linux/packaging/enteauth.desktop@@ -0,0 +1,10 @@+[Desktop Entry]+Name=Auth+GenericName=Ente Authenticator+Exec=enteauth %U+Icon=enteauth+Type=Application+Categories=Utility;+Keywords=Authentication;2FA;+MimeType=x-scheme-handler/enteauth;+StartupNotify=false