broken-snapcraft.yaml 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257
  1. name: wekan
  2. version: 0
  3. version-script: git describe --tags | cut -c 2-
  4. summary: The open-source kanban
  5. description: |
  6. Wekan is an open-source and collaborative kanban board application.
  7. Whether you’re maintaining a personal todo list, planning your holidays with some friends, or working in a team on your next revolutionary idea, Kanban boards are an unbeatable tool to keep your things organized. They give you a visual overview of the current state of your project, and make you productive by allowing you to focus on the few items that matter the most.
  8. Depending on target environment, some configuration settings might need to be adjusted.
  9. For full list of configuration options call:
  10. $ wekan.help
  11. confinement: strict
  12. grade: stable
  13. architectures:
  14. - amd64
  15. plugs:
  16. mongodb-plug:
  17. interface: content
  18. target: $SNAP_DATA/shared
  19. hooks:
  20. configure:
  21. plugs:
  22. - network
  23. - network-bind
  24. slots:
  25. mongodb-slot:
  26. interface: content
  27. write:
  28. - $SNAP_DATA/share
  29. apps:
  30. wekan:
  31. command: wekan-control
  32. daemon: simple
  33. plugs: [network, network-bind]
  34. mongodb:
  35. command: mongodb-control
  36. daemon: simple
  37. plugs: [network, network-bind]
  38. caddy:
  39. command: caddy-control
  40. daemon: simple
  41. plugs: [network, network-bind]
  42. help:
  43. command: wekan-help
  44. database-backup:
  45. command: mongodb-backup
  46. plugs: [network, network-bind]
  47. database-list-backups:
  48. command: ls -al $SNAP_COMMON/db-backups/
  49. database-restore:
  50. command: mongodb-restore
  51. plugs: [network, network-bind]
  52. parts:
  53. mongodb:
  54. source: https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-ubuntu1604-4.2.6.tgz
  55. plugin: dump
  56. stage-packages: [libssl1.0.0, libcurl3]
  57. filesets:
  58. mongo:
  59. - usr
  60. - bin
  61. - lib
  62. stage:
  63. - $mongo
  64. prime:
  65. - $mongo
  66. wekan:
  67. source: .
  68. plugin: nodejs
  69. node-engine: 14.21.3
  70. node-packages:
  71. - node-gyp
  72. - node-pre-gyp
  73. - fibers
  74. build-packages:
  75. - ca-certificates
  76. - apt-utils
  77. - python
  78. - python3
  79. - g++
  80. - capnproto
  81. - curl
  82. - libcurl3
  83. - execstack
  84. - nodejs
  85. - npm
  86. stage-packages:
  87. - libfontconfig1
  88. override-build: |
  89. echo "Cleaning environment first"
  90. rm -rf ~/.meteor ~/.npm /usr/local/lib/node_modules
  91. # Create the OpenAPI specification
  92. rm -rf .build
  93. ## Use Meteor 1.8.x on Snap
  94. #rm -rf .meteor
  95. #mv .snap-meteor-1.8/.meteor .
  96. #mv .snap-meteor-1.8/package.json .
  97. #mv .snap-meteor-1.8/package-lock.json .
  98. ## Meteor 1.9.x has changes to Buffer() => Buffer.alloc(), so reverting those
  99. #mv .snap-meteor-1.8/cfs_access-point.txt fix-download-unicode/
  100. #mv .snap-meteor-1.8/export.js models/
  101. #mv .snap-meteor-1.8/wekanCreator.js models/
  102. #mv .snap-meteor-1.8/ldap.js packages/wekan-ldap/server/ldap.js
  103. #mv .snap-meteor-1.8/oidc_server.js packages/wekan-oidc/oidc_server.js
  104. rm -rf .snap-meteor-1.8
  105. #mkdir -p .build/python
  106. #cd .build/python
  107. #git clone --depth 1 -b master https://github.com/Kronuz/esprima-python
  108. #cd esprima-python
  109. #python3 setup.py install
  110. #cd ../../..
  111. #mkdir -p ./public/api
  112. #python3 ./openapi/generate_openapi.py --release $(git describe --tags --abbrev=0) > ./public/api/wekan.yml
  113. # we temporary need api2html and mkdirp
  114. #npm install -g api2html@0.3.0
  115. #npm install -g mkdirp
  116. #api2html -c ./public/logo-header.png -o ./public/api/wekan.html ./public/api/wekan.yml
  117. #npm uninstall -g mkdirp
  118. #npm uninstall -g api2html
  119. # Node Fibers 100% CPU usage issue:
  120. # https://github.com/wekan/wekan-mongodb/issues/2#issuecomment-381453161
  121. # https://github.com/meteor/meteor/issues/9796#issuecomment-381676326
  122. # https://github.com/sandstorm-io/sandstorm/blob/0f1fec013fe7208ed0fd97eb88b31b77e3c61f42/shell/server/00-startup.js#L99-L129
  123. # Also see beginning of wekan/server/authentication.js
  124. # import Fiber from "fibers";
  125. # Fiber.poolSize = 1e9;
  126. # OLD: Download node version 8.12.0 prerelease build => Official node 8.12.0 has been released
  127. # Description at https://releases.wekan.team/node.txt
  128. ##echo "375bd8db50b9c692c0bbba6e96d4114cd29bee3770f901c1ff2249d1038f1348 node" >> node-SHASUMS256.txt.asc
  129. ##curl https://releases.wekan.team/node -o node
  130. # Verify Fibers patched node authenticity
  131. ##echo "Fibers 100% CPU issue patched node authenticity:"
  132. ##grep node node-SHASUMS256.txt.asc | shasum -a 256 -c -
  133. ##rm -f node-SHASUMS256.txt.asc
  134. ##chmod +x node
  135. ##mv node `which node`
  136. # DOES NOT WORK: paxctl fix.
  137. # Removed from build-packages: - paxctl
  138. #echo "Applying paxctl fix for alpine linux: https://github.com/wekan/wekan/issues/1303"
  139. #paxctl -mC `which node`
  140. #echo "Installing npm"
  141. #curl -L https://www.npmjs.com/install.sh | sh
  142. echo "Installing meteor"
  143. curl https://install.meteor.com/ -o install_meteor.sh
  144. #sed -i "s|RELEASE=.*|RELEASE=\"1.8.1-beta.0\"|g" install_meteor.sh
  145. chmod +x install_meteor.sh
  146. sh install_meteor.sh
  147. rm install_meteor.sh
  148. # REPOS BELOW ARE INCLUDED TO WEKAN REPO
  149. #if [ ! -d "packages" ]; then
  150. # mkdir packages
  151. #fi
  152. #if [ ! -d "packages/kadira-flow-router" ]; then
  153. # cd packages
  154. # git clone --depth 1 -b master https://github.com/wekan/flow-router.git kadira-flow-router
  155. # cd ..
  156. #fi
  157. #if [ ! -d "packages/meteor-useraccounts-core" ]; then
  158. # cd packages
  159. # git clone --depth 1 -b master https://github.com/meteor-useraccounts/core.git meteor-useraccounts-core
  160. # sed -i 's/api\.versionsFrom/\/\/api.versionsFrom/' meteor-useraccounts-core/package.js
  161. # cd ..
  162. #fi
  163. #if [ ! -d "packages/meteor-accounts-cas" ]; then
  164. # cd packages
  165. # git clone --depth 1 -b master https://github.com/wekan/meteor-accounts-cas.git meteor-accounts-cas
  166. # cd ..
  167. #fi
  168. #if [ ! -d "packages/wekan-ldap" ]; then
  169. # cd packages
  170. # git clone --depth 1 -b master https://github.com/wekan/wekan-ldap.git
  171. # cd ..
  172. #fi
  173. #if [ ! -d "packages/wekan-scrollbar" ]; then
  174. # cd packages
  175. # git clone --depth 1 -b master https://github.com/wekan/wekan-scrollbar.git
  176. # cd ..
  177. #fi
  178. #if [ ! -d "packages/wekan_accounts-oidc" ]; then
  179. # cd packages
  180. # git clone --depth 1 -b master https://github.com/wekan/meteor-accounts-oidc.git
  181. # mv meteor-accounts-oidc/packages/switch_accounts-oidc wekan-accounts-oidc
  182. # mv meteor-accounts-oidc/packages/switch_oidc wekan-oidc
  183. # rm -rf meteor-accounts-oidc
  184. # cd ..
  185. #fi
  186. #if [ ! -d "packages/markdown" ]; then
  187. # cd packages
  188. # git clone --depth 1 -b master --recurse-submodules https://github.com/wekan/markdown.git
  189. # cd ..
  190. #fi
  191. rm -rf .build
  192. meteor add standard-minifier-js --allow-superuser
  193. meteor npm install --allow-superuser
  194. meteor npm install --allow-superuser --save babel-runtime
  195. meteor build .build --directory --allow-superuser
  196. cp -f fix-download-unicode/cfs_access-point.txt .build/bundle/programs/server/packages/cfs_access-point.js
  197. #Removed binary version of bcrypt because of security vulnerability that is not fixed yet.
  198. #https://github.com/wekan/wekan/commit/4b2010213907c61b0e0482ab55abb06f6a668eac
  199. #https://github.com/wekan/wekan/commit/7eeabf14be3c63fae2226e561ef8a0c1390c8d3c
  200. #cd .build/bundle/programs/server/npm/node_modules/meteor/npm-bcrypt
  201. #rm -rf node_modules/bcrypt
  202. #meteor npm install --save bcrypt
  203. # Change from npm-bcrypt directory back to .build/bundle/programs/server directory.
  204. #cd ../../../../
  205. # Change to directory .build/bundle/programs/server
  206. cd .build/bundle/programs/server
  207. npm install
  208. npm install --allow-superuser --save babel-runtime
  209. #meteor npm install --save bcrypt
  210. # Change back to Wekan source directory
  211. cd ../../../..
  212. cp -r .build/bundle/* $SNAPCRAFT_PART_INSTALL/
  213. cp .build/bundle/.node_version.txt $SNAPCRAFT_PART_INSTALL/
  214. rm -f $SNAPCRAFT_PART_INSTALL/lib/node_modules/wekan
  215. rm -f $SNAPCRAFT_PART_INSTALL/programs/server/npm/node_modules/meteor/rajit_bootstrap3-datepicker/lib/bootstrap-datepicker/node_modules/phantomjs-prebuilt/lib/phantom/bin/phantomjs
  216. rm -f $SNAPCRAFT_PART_INSTALL/programs/server/npm/node_modules/tar/lib/.mkdir.js.swp
  217. rm -f $SNAPCRAFT_PART_INSTALL/lib/node_modules/node-pre-gyp/node_modules/tar/lib/.mkdir.js.swp
  218. rm -f $SNAPCRAFT_PART_INSTALL/lib/node_modules/node-gyp/node_modules/tar/lib/.mkdir.js.swp
  219. # Meteor 1.8.x additional .swp remove
  220. rm -f $SNAPCRAFT_PART_INSTALL/programs/server/node_modules/node-pre-gyp/node_modules/tar/lib/.mkdir.js.swp
  221. organize:
  222. README: README.wekan
  223. prime:
  224. - -lib/node_modules/node-pre-gyp/node_modules/tar/lib/.unpack.js.swp
  225. helpers:
  226. source: snap-src
  227. plugin: dump
  228. caddy:
  229. plugin: dump
  230. source: https://caddyserver.com/download/linux/amd64?license=personal&telemetry=off
  231. source-type: tar
  232. organize:
  233. caddy: bin/caddy
  234. CHANGES.txt: CADDY_CHANGES.txt
  235. EULA.txt: CADDY_EULA.txt
  236. LICENSES.txt: CADDY_LICENSES.txt
  237. README.txt: CADDY_README.txt
  238. stage:
  239. - -init