Skip to content
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

Proposed solution to the FCIB Problem #8

Open
wants to merge 13 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,8 @@ src/ipkgservice
*.o
tags
nppBackup
.DS_Store
cert.pem
pubkey.pem
signature.sha1
org.webosinternals.ipkgservice
1 change: 0 additions & 1 deletion README

This file was deleted.

9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Preware is a webOS on-device homebrew installer.

## Building

The `build.sh` script should do (or at least, suggest) everything you need -- except for signing keys...

## About Keys

The original build server is lost to time, so its impossible to officially sign builds. However, the key files can be found in an original release package. Extract them from that package, and add to the `keys` folder to produce a working build.
1 change: 0 additions & 1 deletion bin/org.webosinternals.ipkgservice

This file was deleted.

51 changes: 51 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
#!/bin/bash
APPID=org.webosinternals.preware
READY=1
mkdir -p ./bin
[ ! -f keys/cert.pem ] && echo "cert.pem does not exist!" && READY=0
[ ! -f keys/pubkey.pem ] && echo "pubkey.pem does not exist!" && READY=0
[ ! -f keys/signature.sha1 ] && echo "signature.sha1 does not exist!" && READY=0
if [ "$READY" -lt "1" ]; then
echo
echo "Signing keys were not found, this build will NOT run properly on a webOS device"
echo "To make a working build, extract the signing keys from a previous official build"
echo
fi

useBin=arm
for arg in "$@"; do
if [ "$arg" = 'i686' ]; then
useBin=i686
fi
done

echo "building preware for $useBin..."
rm ./source/bin/org.webosinternals.ipkgservice >/dev/null 2>&1
cp ./source/bin/org.webosinternals.ipkgservice.$useBin ./source/bin/org.webosinternals.ipkgservice

# Bundle everything into a palm package
palm-package source/. -o ./bin --exclude=*.arm --exclude=*.i686
# Find what was just made
unset -v ipk
for file in "./bin"/*.ipk; do
[[ $file -nt $ipk ]] && ipk=$file
done
if [ -z "${ipk:-}" ]; then
echo "build failed, palm-package did not produce a deployable ipk"
exit
fi

# Inject extra files
echo "adding install files..."
ar qv $ipk source/pmPostInstall.script
ar qv $ipk source/pmPreRemove.script
ar qv $ipk keys/cert.pem
ar qv $ipk keys/pubkey.pem
ar qv $ipk keys/signature.sha1
mv $ipk ${ipk%_all.ipk}_$useBin.ipk
for file in "./bin"/*.ipk; do
[[ $file -nt $ipk ]] && ipk=$file
done
echo
echo "output ready at $ipk"

7 changes: 7 additions & 0 deletions keys/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Keys

Copy the following files from a previous, official release of Preware into this folder:

- cert.pem
- pubkey.pem
- signature.sha1
394 changes: 0 additions & 394 deletions resources/de/lexicon.json

This file was deleted.

269 changes: 0 additions & 269 deletions resources/de/strings.json

This file was deleted.

File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ function StartupAssistant(changelog)
// on new version start
this.newMessages =
[
{ version: '1.9.16', log: [ 'Restore support for Intel targets (emulator)',
'Updated Italian translations (courtesy of David20Craft)'] },
{ version: '1.9.15', log: [ 'Move PreCentral feed to backup server',
'Add App Museum feed (disabled by default)'] },
{ version: '1.9.14', log: [ 'Added and enabled PivotCE Preware feed'] },
{ version: '1.9.13', log: [ 'Moved package feeds to ipkg.preware.net',
'Updated birthday icon to remove the year number' ] },
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
8 changes: 4 additions & 4 deletions appinfo.json → source/appinfo.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"title": "Preware",
"id": "org.webosinternals.preware",
"version": "1.9.14",
"release_date": "18-April-2015",
"version": "1.9.16",
"release_date": "20-October-2023",
"vendor": "WebOS Internals",
"vendor_email": "[email protected]",
"vendor_url": "http://www.webos-internals.org/wiki/Application:Preware",
Expand All @@ -22,7 +22,7 @@
"launchParam":"viewPackage",
"launchParamDbField":"id",
"displayFields":["display","secondary"],
"dbQuery":{"from":"org.webosinternals.preware.justType:1","where":[{"prop":"display","op":"?","val":"", "collate": "primary"}], "limit":20}
}
"dbQuery":{"from":"org.webosinternals.preware.justType:1","where":[{"prop":"display","op":"?","val":"", "collate": "primary"}], "limit":20}
}
}
}
Binary file added source/bin/org.webosinternals.ipkgservice.arm
Binary file not shown.
Binary file added source/bin/org.webosinternals.ipkgservice.i686
Binary file not shown.
13 changes: 9 additions & 4 deletions control/postinst → source/control/postinst
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,16 @@ echo "src/gz optware-`/bin/uname -m` http://ipkg.preware.net/feeds/optware/`/bin
sed -i -e 's|armv7l|armv7|g' $APPS/etc/ipkg/optware.conf
sed -i -e 's|armv6l|armv6|g' $APPS/etc/ipkg/optware.conf

# Install WOSA feeds
echo "src/gz precentral http://weboslives.eu/feeds/wosa" > $APPS/etc/ipkg/wosa.conf
# Remove dead webosnation feed
rm -f $APPS/etc/ipkg/precentral.conf

# Install precentral feeds (updated with backup location hosted on weboslives.eu)
echo "src/gz precentral http://weboslives.eu/feeds/precentral" > $APPS/etc/ipkg/precentral.conf
# Install backup webosnation feed
echo "src/gz precentral http://weboslives.eu/feeds/precentral" > $APPS/etc/ipkg/precentral-weboslives.conf

# Install App Museum feed (disabled by default)
echo "src/gz precentral http://weboslives.eu/feeds/wosa" > $APPS/etc/ipkg/wosa-appmuseum.conf.new

# Install PreCentral theme feed
echo "src/gz precentral-themes http://ipkg.preware.net/feeds/precentral-themes" > $APPS/etc/ipkg/precentral-themes.conf.new

# Install PivotCE feeds
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading