This port provides FreeBSD with a mostly BSD-licensed web browser, based on Webkit and Gtk+. The Courgette source code and MPEG-LA licensed codecs have been removed from the source tarball. Further, I'm hosting the source myself, so no potential liability can fall on anyone else, just like with the x264 port. The shar file was too big to send, so I'm hosting it at http://chromium.jaggeri.com/chromium.shar instead. This port depends on alsa-lib ports/145964. Thanks to Ben Laurie, Aragon, Peter Valchev, Evan Martin, zloidemon, Ariff, and all others who contributed pieces to help make this possible.
Responsible Changed From-To: freebsd-ports-bugs->rene Grab
I've updated this port to optionally download and compile the patented MPEG-LA codecs. If the user enables the codecs option, the codec source code is directly checked out from Google's repository through subversion, so the MPEG-LA source code isn't hosted by me or FreeBSD. This change will allow those who choose to compile the extra codecs to use HTML 5 video on sites like vimeo and youtube. The new shar file is hosted at http://chromium.jaggeri.com/chromium-codecs.shar
I've updated the port with another small fix, to add a runtime dependency on the alsa-plugins port for OSS support. The new shar file is hosted at http://chromium.jaggeri.com/chromium-codecs2.shar
It conflicts with icu, which is required by dozen of kde ports. What is the supposed method of installing - removing entire KDE ? Sounds harmful. Just curious. Furthermore, it fails to build when searching for libpng12 (may be this is caused by commented out conflict with icu, so at the time probably nvm).
As noted in the Makefile, it's only a build conflict, so you can pkg_delete icu, build chromium, then install both. I looked into fixing this, but the problem is that Chromium uses pkg-config to find the include directories for relevant header files and FreeBSD puts some of them directly in ${LOCALBASE}/include, which leads to the system icu also getting pulled in from ${LOCALBASE}/include/unicode. Apparently this doesn't happen on linux, I don't see an easy way to fix this without changing where other ports like gtk, freetype, and fontconfig install their header files. As for png, the current patch only works with 1.4, because patch-thirdparty has a png 1.4-specific patch. You can always revert that one png-related file diff and it will work with png 1.2 also. I suppose this could be made an option in the Makefile if needed.
I tried to build last port version from here, with icu deleted. Still cannot build: ===Cut=== # make ===> Vulnerability check disabled, database not found ===> Found saved configuration for chromium-5.0.359 ===> chromium-5.0.359 depends on executable: svn - found To build Chromium, you should have around 1 GB of memory and a fair amount of free diskspace (~ 1.5GB). ===> Extracting for chromium-5.0.359 => MD5 Checksum OK for chromium-42139.tar.bz2. => SHA256 Checksum OK for chromium-42139.tar.bz2. ===> chromium-5.0.359 depends on file: /usr/local/bin/perl5.8.9 - found /bin/rm -rf /usr/tmp/usr/home/emz/chromium-codecs2/work/chromium-42139/third_party/ffmpeg/source/patched-ffmpeg-mt svn export -r 42082 http://src.chromium.org/svn/trunk/deps/third_party/ffmpeg/patched-ffmpeg-mt /usr/tmp/usr/home/emz/chromium-codecs2/work/chromium-42139/third_party/ffmpeg/source/patched-ffmpeg-mt svn: '/svn/!svn/bc/48911/trunk/deps/third_party/ffmpeg/patched-ffmpeg-mt' path not found *** Error code 1 Stop in /usr/home/emz/chromium-codecs2. *** Error code 1 Stop in /usr/home/emz/chromium-codecs2. ===Cut=== After all, I'm sorry, but I think that involving additional downloads or checkouts in ports is a completely bad idea - the svn server can change it's place, it can become unavailable, and so on, without the possibility to use alternate sources. Exactly same thing happened above. Eugene. P.S. Still hoping to see chromium in ports.
Sorry to keep up bothering, but the original shar, without svn involved, still cannot be built: ===Cut=== # make ===> chromium-5.0.359 depends on executable: flex - found ===> chromium-5.0.359 depends on executable: gperf - found ===> chromium-5.0.359 depends on executable: bash - found ===> chromium-5.0.359 depends on executable: yasm - found ===> chromium-5.0.359 depends on file: /usr/local/bin/python2.6 - found ===> chromium-5.0.359 depends on executable: gmake - found ===> chromium-5.0.359 depends on executable: bison - found ===> chromium-5.0.359 depends on file: /usr/local/libdata/pkgconfig/scrnsaverproto.pc - found ===> chromium-5.0.359 depends on file: /usr/local/bin/perl5.8.9 - found ===> chromium-5.0.359 depends on file: /usr/local/bin/intltool-extract - found ===> chromium-5.0.359 depends on executable: pkg-config - found ===> chromium-5.0.359 depends on shared library: execinfo.1 - found ===> chromium-5.0.359 depends on shared library: nss3.1 - found ===> chromium-5.0.359 depends on shared library: cairo.2 - found ===> chromium-5.0.359 depends on shared library: dbus-1.3 - found ===> chromium-5.0.359 depends on shared library: dbus-glib-1.2 - found ===> chromium-5.0.359 depends on shared library: Xss.1 - found ===> chromium-5.0.359 depends on shared library: asound.2 - not found ===> Verifying install for asound.2 in /usr/ports/audio/alsa-lib => No directory for asound.2. Skipping.. ===> chromium-5.0.359 depends on shared library: freetype.9 - found ===> chromium-5.0.359 depends on shared library: atk-1.0.0 - found ===> chromium-5.0.359 depends on shared library: gconf-2.4 - found ===> chromium-5.0.359 depends on shared library: glib-2.0.0 - found ===> chromium-5.0.359 depends on shared library: gtk-x11-2.0.0 - found ===> chromium-5.0.359 depends on shared library: IDL-2.0 - found ===> chromium-5.0.359 depends on shared library: xml2.5 - found ===> chromium-5.0.359 depends on shared library: ORBit-2.0 - found ===> chromium-5.0.359 depends on shared library: pango-1.0.0 - found ===> Configuring for chromium-5.0.359 cd /usr/tmp/usr/home/emz/chromium/work/chromium-42139 && /usr/bin/env GYP_GENERATORS="make" GYP_DEFINES="use_system_libxml=1" /usr/local/bin/python2.6 ./build/gyp_chromium chrome/chrome.gyp --depth ./ Updating projects from gyp files... gnome-config: not found Package libpng12 was not found in the pkg-config search path. Perhaps you should add the directory containing `libpng12.pc' to the PKG_CONFIG_PATH environment variable Package 'libpng12', required by 'cairo', not found Traceback (most recent call last): File "./build/gyp_chromium", line 89, in <module> sys.exit(gyp.main(args)) File "./tools/gyp/pylib/gyp/__init__.py", line 434, in main options.circular_check) File "./tools/gyp/pylib/gyp/__init__.py", line 83, in Load depth, generator_input_info, check, circular_check) File "./tools/gyp/pylib/gyp/input.py", line 2110, in Load depth, check) File "./tools/gyp/pylib/gyp/input.py", line 399, in LoadTargetBuildFile includes, depth, check) File "./tools/gyp/pylib/gyp/input.py", line 399, in LoadTargetBuildFile includes, depth, check) File "./tools/gyp/pylib/gyp/input.py", line 357, in LoadTargetBuildFile build_file_path) File "./tools/gyp/pylib/gyp/input.py", line 940, in ProcessVariablesAndConditionsInDict build_file) File "./tools/gyp/pylib/gyp/input.py", line 955, in ProcessVariablesAndConditionsInList ProcessVariablesAndConditionsInDict(item, is_late, variables, build_file) File "./tools/gyp/pylib/gyp/input.py", line 914, in ProcessVariablesAndConditionsInDict ProcessConditionsInDict(the_dict, is_late, variables, build_file) File "./tools/gyp/pylib/gyp/input.py", line 791, in ProcessConditionsInDict variables, build_file) File "./tools/gyp/pylib/gyp/input.py", line 933, in ProcessVariablesAndConditionsInDict build_file, key) File "./tools/gyp/pylib/gyp/input.py", line 940, in ProcessVariablesAndConditionsInDict build_file) File "./tools/gyp/pylib/gyp/input.py", line 959, in ProcessVariablesAndConditionsInList expanded = ExpandVariables(item, is_late, variables, build_file) File "./tools/gyp/pylib/gyp/input.py", line 626, in ExpandVariables (contents, p.returncode)) Exception: Call to 'pkg-config --cflags gtk+-2.0 gthread-2.0' returned exit status 1. while loading dependencies of skia/skia.gyp while loading dependencies of chrome/chrome.gyp while trying to load chrome/chrome.gyp *** Error code 1 Stop in /usr/home/emz/chromium. # ===Cut=== Maby it's messing with the dependency from linux-base: ===Cut=== # pkg_info | grep png linux-f10-png-1.2.37 RPM of the PNG lib (Linux Fedora 10) png-1.4.1_1 Library for manipulating PNG images ===Cut=== Eugene.
For the first ffmpeg build error, it looks like they moved the location of their patched ffmpeg three days ago, easily fixed in the next update to this port. We don't have a choice but to checkout from their subversion repository as that code involves patented codecs. Either you choose to download that ffmpeg code using the options or you turn it off: it's up to you as the user. They haven't moved that ffmpeg location in 8 months, so I think updating the port once a year to track if necessary won't be a problem. :) As for the second png error, it looks like a installation/configuration error on your part. Chromium checks the dependencies for Cairo through pkg-config and your Cairo is probably still built against png 1.2, even though you upgraded to the png 1.4 port. Check this by running pkg_info -rx cairo and look for Dependency: png-1.2 in the dependency list. If you upgrade Cairo to depend on png 1.4, this shouldn't be a problem. Also, I notice that you didn't install the ALSA ports, Chromium won't build without that dependency either.
I've updated this port again with the new ffmpeg svn url and some other tweaks: http://chromium.hybridsource.org/chromium-codecs3.shar I moved NSS to a build dependency to enforce NSS>=3.12. I looked into the reason for icu/glew header conflicts while building: it's because the libX11 and jpeg ports install directly into ${LOCALBASE}/include. Chromium queries pkg-config for the location of those header files and then adds -I${LOCALBASE}/include to pull them in, but that also pulls in ${LOCALBASE}/include/unicode and ${LOCALBASE}/include/GL which conflict with Chromium's locally patched icu and glew. I've removed CONFLICTS and replaced it with a dialog to let users move the icu and glew header files out of the way instead, if those packages are installed. I've set IS_INTERACTIVE for this reason, but I'm not sure if it's necessary since interactivity only happens if you have either of those two ports installed. I took a stab at making this port not depend on /usr/local for ${LOCALBASE} but since the NSS port wouldn't compile without /usr/local, I wasn't able to test that. Finally, I made some URL/email changes to the Makefile and listed the main licenses that I know various parts of Chromium use: BSD, LGPL, and MPL.
Ok, great thanks for the help, with cairo rebuilt chromium succeeded to compile and install. I had also to recompile gtk, 2.18.x -> 2.20.1._2, to solve this: http://zhegan.in/files/all-red.png . I think you need to add the gtk lib version dependency. Thanks for the great work.
No, that's a png issue also, it only worked when you updated because you also updated its png dependency. Those red spots are where it couldn't load the pngs because your old Gtk was linked against an old png library. Chromium works fine with any Gtk version going back to 2.12.
I had a few errors while building using gcc45 and none with basegcc. Here they are $ make ... CXX(target) out/Release/obj.target/libjingle/third_party/libjingle/files/talk/base/stringencode.o third_party/libjingle/files/talk/base/stringencode.cc:32:20: fatal error: alloca.h: No such file or directory fixed it by applying ports/net-im/libjingle/files/patch-talk__base__stringencode.cc CXX(target) out/Release/obj.target/libjingle/third_party/libjingle/files/talk/base/diskcache.o In file included from third_party/libjingle/files/talk/base/diskcache.cc:39:0: third_party/libjingle/files/talk/base/stream.h:289:3: error: 'FILE' does not name a type ... CXX(target) out/Release/obj.target/browser/chrome/browser/zygote_main_linux.o chrome/browser/zygote_main_linux.cc:218:6: error: #elif with no expression ... CXX(target) out/Release/obj.target/plugin/chrome/plugin/plugin_main_linux.o chrome/plugin/plugin_main_linux.cc:8:21: fatal error: syscall.h: No such file or directory fixed it by --- a.diff begins here --- --- base/trace_event.cc~ +++ base/trace_event.cc @@ -2,6 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include <cstdio> + #include "base/trace_event.h" #include "base/format_macros.h" --- chrome/browser/zygote_main_linux.cc~ +++ chrome/browser/zygote_main_linux.cc @@ -215,7 +215,7 @@ class Zygote { base::ProcessId child; #if defined(OS_FREEBSD) uint32_t dummy_inode = 0; -#elif +#else uint64_t dummy_inode = 0; #endif int dummy_fd = -1; --- chrome/plugin/plugin_main_linux.cc~ +++ chrome/plugin/plugin_main_linux.cc @@ -5,7 +5,7 @@ #include <signal.h> #include <string.h> #include <sys/types.h> -#include <syscall.h> +#include <sys/syscall.h> #include <unistd.h> #include "build/build_config.h" --- third_party/libjingle/files/talk/base/stream.h~ +++ third_party/libjingle/files/talk/base/stream.h @@ -28,6 +28,8 @@ #ifndef TALK_BASE_STREAM_H__ #define TALK_BASE_STREAM_H__ +#include <cstdio> + #include "talk/base/basictypes.h" #include "talk/base/logging.h" #include "talk/base/scoped_ptr.h" --- a.diff ends here ---
hi there, just wanted to inform anybody that this port builds fine with CC = /usr/local/bin/clang CCX = /usr/local/bin/clang++ CPP = /usr/local/bin/clang and llvm-devel-2.8.r103179_1. haven't tried with the recently committed base version of clang. cheers. alex -- Alexander Best
> just wanted to inform anybody that this port builds fine with > CC = /usr/local/bin/clang > CCX = /usr/local/bin/clang++ Not CXX? Then you're not using it. > CPP = /usr/local/bin/clang > and llvm-devel-2.8.r103179_1. haven't tried with the recently > committed base version of clang. It fails here on both clang++ from devel/llvm-devel and /usr/bin (in /head). $ make CC=clang CXX=clang++ MAKE_JOBS_UNSAFE= V=1 ... clang++ -O2 -pipe -fno-strict-aliasing -pthread -fno-exceptions -Wno-unused-parameter -Wno-missing-field-initializers -D_FILE_OFFSET_BITS=64 -fvisibility=hidden -fno-strict-aliasing -fno-ident -fdata-sections -ffunction-sections -fomit-frame-pointer -O3 -I/usr/pkg/include -fno-rtti -fno-threadsafe-statics -fvisibility-inlines-hidden -DENABLE_LOGGING_AND_PROFILING -DENABLE_DEBUGGER_SUPPORT -DDISABLE_NACL -DV8_TARGET_ARCH_X64 -DV8_NATIVE_REGEXP -DCHROMIUM_BUILD -DNDEBUG -DNVALGRIND -Iv8/src -MMD -MF out/ Release/.deps/out/Release/obj.target/v8_snapshot/gen/libraries-empty.o.d.tmp -c -o out/Release/obj.target/v8_snapshot/gen/libraries-empty.o out/Release/obj/gen/libraries-empty.cc clang: warning: argument unused during compilation: '-O2' clang: warning: argument unused during compilation: '-fno-ident' clang: warning: argument unused during compilation: '-fvisibility-inlines-hidden' In file included from out/Release/obj/gen/libraries-empty.cc:7: In file included from v8/src/v8.h:59: v8/src/utils.h:589:71: error: expected string literal : /* no clobbered list as all inputs are considered clobbered */); ^ 1 error generated. gmake: *** [out/Release/obj.target/v8_snapshot/gen/libraries-empty.o] Error 1 *** Error code 1
On Fri, Jun 18, 2010 at 2:26 AM, Anonymous <swell.k@gmail.com> wrote: >> just wanted to inform anybody that this port builds fine with > >> CC =3D /usr/local/bin/clang >> CCX =3D /usr/local/bin/clang++ > > Not CXX? Then you're not using it. oh damn. sorry for the noise. indeed i misspelled CXX. after correcting the mistake clang indeed fails to build the port. > >> CPP =3D /usr/local/bin/clang > >> and llvm-devel-2.8.r103179_1. haven't tried with the recently >> committed base version of clang. > > It fails here on both clang++ from devel/llvm-devel and /usr/bin (in /hea= d). > > =A0$ make CC=3Dclang CXX=3Dclang++ MAKE_JOBS_UNSAFE=3D V=3D1 > =A0... > =A0 =A0clang++ -O2 -pipe -fno-strict-aliasing -pthread -fno-exceptions -W= no-unused-parameter -Wno-missing-field-initializers -D_FILE_OFFSET_BITS=3D6= 4 -fvisibility=3Dhidden -fno-strict-aliasing -fno-ident -fdata-sections -ff= unction-sections -fomit-frame-pointer -O3 -I/usr/pkg/include -fno-rtti -fno= -threadsafe-statics -fvisibility-inlines-hidden -DENABLE_LOGGING_AND_PROFIL= ING -DENABLE_DEBUGGER_SUPPORT -DDISABLE_NACL -DV8_TARGET_ARCH_X64 -DV8_NATI= VE_REGEXP -DCHROMIUM_BUILD -DNDEBUG -DNVALGRIND -Iv8/src -MMD -MF out/Relea= se/.deps/out/Release/obj.target/v8_snapshot/gen/libraries-empty.o.d.tmp -c = -o out/Release/obj.target/v8_snapshot/gen/libraries-empty.o out/Release/obj= /gen/libraries-empty.cc > =A0clang: warning: argument unused during compilation: '-O2' > =A0clang: warning: argument unused during compilation: '-fno-ident' > =A0clang: warning: argument unused during compilation: '-fvisibility-inli= nes-hidden' > =A0In file included from out/Release/obj/gen/libraries-empty.cc:7: > =A0In file included from v8/src/v8.h:59: > =A0v8/src/utils.h:589:71: error: expected string literal > =A0 =A0 =A0 =A0: /* no clobbered list as all inputs are considered clobbe= red */); > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0^ > =A01 error generated. > =A0gmake: *** [out/Release/obj.target/v8_snapshot/gen/libraries-empty.o] = Error 1 > =A0*** Error code 1 > --=20 Alexander Best
BTW, can you compress the distfile for USE_XZ next time. $ bzip2 -dc chrom*bz2 | xz -9 >chromium-42139.tar.xz $ du -Ah chrom* 132M chromium-42139.tar.bz2 97M chromium-42139.tar.xz $ time bzip2 -dc chrom*bz2 >/dev/null bzip2 -dc chromium-42139.tar.bz2 > /dev/null 17.55s user 0.06s system 99% cpu 17.706 total $ time xz -dc chrom*xz >/dev/null xz -dc chromium-42139.tar.xz > /dev/null 8.85s user 0.15s system 99% cpu 9.047 total As you can see bz2 archive takes almost twice as much time to decompress. On a 9yo system the numbers are greater: 117s (bz2) vs. 41s (xz)
One of the linux Chromium devs has been patching Chromium to work with clang - http://codereview.chromium.org/522020 I have been following his progress and tested his work-in-progress patches a couple times. With his latest patch and some of the FreeBSD modifications swell.k posted, I was able to build and link a lot of Chromium with trunk clang, though not all of it. I'm looking forward to building Chromium with clang by the end of the year. :) As for using xz rather than bzip2, bandwidth hasn't been a problem yet but I'll look into switching.
I have updated this port to the newest version of the first stable build for linux, that was just released a month ago: http://googlechromereleases.blogspot.com/2010/05/stable-channel-update.html The Chromium source tarball is now downloaded from Google directly and I've marked the entire port RESTRICTED because the new source tarball includes the allegedly patent-infringing source code for both Courgette and the MPEG-LA codecs, though Courgette isn't compiled by this build and the codecs are only optionally compiled if the user chooses. No legal review by the FreeBSD Foundation should be necessary now that this port is wholly RESTRICTED, as opposed to how it was only RESTRICTED before if the codecs were compiled. Hopefully this change means the port can be committed soon, as linux distros like arch linux also build from the stable chromium source tarballs without any legal trouble (http://www.archlinux.org/packages/extra/x86_64/chromium/). I have changed the shared memory backend for Chromium with this upgrade: you MUST make sure that 'sysctl kern.ipc.shm_allow_removed=0' for this stable build to work. The latest port can be found here: http://chromium.hybridsource.org/chromium-stable.shar
- your hack to move directories under ${LOCALBASE}/include is going to fail when user builds the port as non-root - /tmp is not guaranteed to persist between reboots according to hier(7)[1] Use `?=' to pick up TMPDIR from environ(7) or make.conf(5). - INSTALL_PROGRAM not only installs but STRIPs as well. Besides, use BINMODE (default is 555) instead of 0755. - Unless I'm missing smth WRKSRC is already ${WRKDIR}/${DISTNAME} by default according to bsd.port.mk. [1] If cold reboot occured user can try to continue build from before but post-build will fail if /tmp was mounted as tmpfs(5) or as ufs over md(4). --- a.diff begins here --- diff --git www/chromium/Makefile www/chromium/Makefile index c5a17ea..0497dcd 100644 --- www/chromium/Makefile +++ www/chromium/Makefile @@ -30,7 +30,7 @@ LIB_DEPENDS= execinfo.1:${PORTSDIR}/devel/libexecinfo \ RUN_DEPENDS= ${LOCALBASE}/lib/alsa-lib/libasound_module_pcm_oss.so:${PORTSDIR}/audio/alsa-plugins -WRKSRC= ${WRKDIR}/${DISTNAME} +TMPDIR?= /var/tmp RESTRICTED= tarball contains some allegedly patent-infringing source code ONLY_FOR_ARCHS= i386 amd64 @@ -106,13 +106,13 @@ pre-fetch: @${ECHO} "The following commands will be run to move header files:" @${ECHO} .if ${HAVE_ICU} != "nope" - @${ECHO} '${MV} ${LOCALBASE}/include/unicode /tmp' + @${ECHO} '${MV} ${LOCALBASE}/include/unicode ${TMPDIR}' .endif .if ${HAVE_GLEW} != "nope" - @${ECHO} '${MV} ${LOCALBASE}/include/GL /tmp' + @${ECHO} '${MV} ${LOCALBASE}/include/GL ${TMPDIR}' .endif .if ${HAVE_FFMPEG} != "nope" - @${ECHO} '${MV} ${LOCALBASE}/include/libav* /tmp' + @${ECHO} '${MV} ${LOCALBASE}/include/libav* ${TMPDIR}' .endif @${ECHO} @${ECHO} "These headers will be moved back to ${LOCALBASE}/include after a successful build," @@ -126,13 +126,25 @@ pre-fetch: esac) @${ECHO} .if (${HAVE_ICU} != "nope") && exists(${LOCALBASE}/include/unicode) - ${MV} ${LOCALBASE}/include/unicode /tmp +.if ${UID} != 0 && !defined(INSTALL_AS_USER) + ${MV} ${LOCALBASE}/include/unicode ${TMPDIR} +.else + ${SU_CMD} "${MV} ${LOCALBASE}/include/unicode ${TMPDIR}" +.endif .endif .if (${HAVE_GLEW} != "nope") && exists(${LOCALBASE}/include/GL) - ${MV} ${LOCALBASE}/include/GL /tmp +.if ${UID} != 0 && !defined(INSTALL_AS_USER) + ${MV} ${LOCALBASE}/include/GL ${TMPDIR} +.else + ${SU_CMD} "${MV} ${LOCALBASE}/include/GL ${TMPDIR}" +.endif .endif .if (${HAVE_FFMPEG} != "nope") && exists(${LOCALBASE}/include/libavutil) - ${MV} ${LOCALBASE}/include/libav* /tmp +.if ${UID} != 0 && !defined(INSTALL_AS_USER) + ${MV} ${LOCALBASE}/include/libav* ${TMPDIR} +.else + ${SU_CMD} "${MV} ${LOCALBASE}/include/libav* ${TMPDIR}" +.endif .endif @${ECHO} .endif @@ -151,14 +163,26 @@ do-configure: ${SETENV} GYP_GENERATORS="make" GYP_DEFINES="${GYP_DEFINES}" ${PYTHON_CMD} ./build/gyp_chromium chrome/chrome.gyp --depth ./ post-build: -.if (${HAVE_ICU} != "nope") && exists(/tmp/unicode) - ${MV} /tmp/unicode ${LOCALBASE}/include +.if (${HAVE_ICU} != "nope") && exists(${TMPDIR}/unicode) +.if ${UID} != 0 && !defined(INSTALL_AS_USER) + ${MV} ${TMPDIR}/unicode ${LOCALBASE}/include +.else + ${SU_CMD} "${MV} ${TMPDIR}/unicode ${LOCALBASE}/include" +.endif +.endif +.if (${HAVE_GLEW} != "nope") && exists(${TMPDIR}/GL) +.if ${UID} != 0 && !defined(INSTALL_AS_USER) + ${MV} ${TMPDIR}/GL ${LOCALBASE}/include +.else + ${SU_CMD} "${MV} ${TMPDIR}/GL ${LOCALBASE}/include" .endif -.if (${HAVE_GLEW} != "nope") && exists(/tmp/GL) - ${MV} /tmp/GL ${LOCALBASE}/include .endif .if (${HAVE_FFMPEG} != "nope") - ${MV} /tmp/libav* ${LOCALBASE}/include +.if ${UID} != 0 && !defined(INSTALL_AS_USER) + ${MV} ${TMPDIR}/libav* ${LOCALBASE}/include +.else + ${SU_CMD} "${MV} ${TMPDIR}/libav* ${LOCALBASE}/include" +.endif .endif do-install: @@ -166,9 +190,11 @@ do-install: ${INSTALL_MAN} ${WRKSRC}/out/${BUILDTYPE}/chrome.1 ${MANPREFIX}/man/man1 ${INSTALL_DATA} ${WRKSRC}/out/${BUILDTYPE}/chrome.pak ${DATADIR} ${INSTALL_DATA} ${WRKSRC}/out/${BUILDTYPE}/product_logo_48.png ${DATADIR} -.for f in chrome chrome-wrapper ffmpegsumo_nolink libffmpegsumo.so mksnapshot protoc xdg-settings - ${INSTALL_DATA} ${WRKSRC}/out/${BUILDTYPE}/${f} ${DATADIR} - ${CHMOD} 0755 ${DATADIR}/${f} +.for f in chrome ffmpegsumo_nolink libffmpegsumo.so mksnapshot protoc + ${INSTALL_PROGRAM} ${WRKSRC}/out/${BUILDTYPE}/${f} ${DATADIR} +.endfor +.for f in chrome-wrapper xdg-settings + ${INSTALL_SCRIPT} ${WRKSRC}/out/${BUILDTYPE}/${f} ${DATADIR} .endfor cd ${WRKSRC}/out/${BUILDTYPE} && ${COPYTREE_SHARE} "locales resources" ${DATADIR} ${LN} -sf ${DATADIR}/chrome ${PREFIX}/bin/ --- a.diff ends here ---
Anonymous <swell.k@gmail.com> writes: > .if (${HAVE_ICU} != "nope") && exists(${LOCALBASE}/include/unicode) > - ${MV} ${LOCALBASE}/include/unicode /tmp > +.if ${UID} != 0 && !defined(INSTALL_AS_USER) Oops, not only it doesn't work because UID is not yet defined but the conditional is reversed, too. Besides, INSTALL_AS_USER is irrelevant here, we're neither installing nor deinstalling and touching LOCALBASE, not PREFIX. See the fix below. > + ${MV} ${LOCALBASE}/include/unicode ${TMPDIR} > +.else > + ${SU_CMD} "${MV} ${LOCALBASE}/include/unicode ${TMPDIR}" > +.endif Sorry. --- b.diff begins here --- diff --git www/chromium/Makefile www/chromium/Makefile index 0497dcd..7ec479c 100644 --- www/chromium/Makefile +++ www/chromium/Makefile @@ -82,6 +82,10 @@ HAVE_ICU!= ${PKG_INFO} -E 'icu-*' || ${ECHO} nope HAVE_GLEW!= ${PKG_INFO} -E 'glew-*' || ${ECHO} nope HAVE_FFMPEG!= ${PKG_INFO} -E 'ffmpeg-*' || ${ECHO} nope +.if !defined(UID) +UID!= ${ID} -u +.endif + pre-fetch: @${ECHO} @${ECHO} "To build Chromium, you should have around 1 GB of memory" @@ -126,21 +130,21 @@ pre-fetch: esac) @${ECHO} .if (${HAVE_ICU} != "nope") && exists(${LOCALBASE}/include/unicode) -.if ${UID} != 0 && !defined(INSTALL_AS_USER) +.if ${UID} == 0 ${MV} ${LOCALBASE}/include/unicode ${TMPDIR} .else ${SU_CMD} "${MV} ${LOCALBASE}/include/unicode ${TMPDIR}" .endif .endif .if (${HAVE_GLEW} != "nope") && exists(${LOCALBASE}/include/GL) -.if ${UID} != 0 && !defined(INSTALL_AS_USER) +.if ${UID} == 0 ${MV} ${LOCALBASE}/include/GL ${TMPDIR} .else ${SU_CMD} "${MV} ${LOCALBASE}/include/GL ${TMPDIR}" .endif .endif .if (${HAVE_FFMPEG} != "nope") && exists(${LOCALBASE}/include/libavutil) -.if ${UID} != 0 && !defined(INSTALL_AS_USER) +.if ${UID} == 0 ${MV} ${LOCALBASE}/include/libav* ${TMPDIR} .else ${SU_CMD} "${MV} ${LOCALBASE}/include/libav* ${TMPDIR}" @@ -164,21 +168,21 @@ do-configure: post-build: .if (${HAVE_ICU} != "nope") && exists(${TMPDIR}/unicode) -.if ${UID} != 0 && !defined(INSTALL_AS_USER) +.if ${UID} == 0 ${MV} ${TMPDIR}/unicode ${LOCALBASE}/include .else ${SU_CMD} "${MV} ${TMPDIR}/unicode ${LOCALBASE}/include" .endif .endif .if (${HAVE_GLEW} != "nope") && exists(${TMPDIR}/GL) -.if ${UID} != 0 && !defined(INSTALL_AS_USER) +.if ${UID} == 0 ${MV} ${TMPDIR}/GL ${LOCALBASE}/include .else ${SU_CMD} "${MV} ${TMPDIR}/GL ${LOCALBASE}/include" .endif .endif .if (${HAVE_FFMPEG} != "nope") -.if ${UID} != 0 && !defined(INSTALL_AS_USER) +.if ${UID} == 0 ${MV} ${TMPDIR}/libav* ${LOCALBASE}/include .else ${SU_CMD} "${MV} ${TMPDIR}/libav* ${LOCALBASE}/include" --- b.diff ends here ---
I've updated this port again, pulling in the latest stable release with bugfixes and I've tweaked the port a bit too. I've found a workaround for the pkg conflicts with ffmpeg, glew, and icu, so that moving the header files isn't necessary anymore. I don't use INSTALL_PROGRAM as I want to leave symbols in for proper backtraces and debugging in case Chromium has any problems. As noted before, I have changed the shared memory backend for Chromium with the shift to 5.0.375-stable: you MUST make sure that 'sysctl kern.ipc.shm_allow_removed=0' for this stable build to work. The latest port can be found here: http://chromium.hybridsource.org/chromium-stable-106.shar
Updated again to correct some minor mistakes, as usual, make sure that 'sysctl kern.ipc.shm_allow_removed=0': http://chromium.hybridsource.org/chromium-stable-106.shar.txt
(CC me when replying, it doesn't show up on freebsd-ports-bugs@) Why you need symbols when you're not even building with `-g' by default? If you don't want strip(1)'ing then use one of the following - define empty STRIP (bsd.port.mk and bsd.own.mk) - define WITH_DEBUG (bsd.port.mk) - define DEBUG_FLAGS (bsd.own.mk) BTW, binaries should be under BINMODE (default 555, not 755) and you can just add it to install(1) args, e.g. ${INSTALL_DATA} -m ${BINMODE} ...
- use ECHO_MSG as noted in Porter's Handbook and bsd.commands.mk - use pre-everything for message like most ports do, less prone to miss it --- a.diff begins here --- diff --git www/chromium/Makefile www/chromium/Makefile index ac00d1d..42b1f70 100644 --- www/chromium/Makefile +++ www/chromium/Makefile @@ -75,15 +75,15 @@ BUILDTYPE= Debug MAKE_ENV+= BUILDTYPE=${BUILDTYPE} MAKE_JOBS_SAFE= yes -pre-fetch: - @${ECHO} - @${ECHO} "To build Chromium, you should have around 1 GB of memory" +pre-everything::.SILENT + ${ECHO_MSG} + ${ECHO_MSG} "To build Chromium, you should have around 1 GB of memory" .if defined(WITH_DEBUG) - @${ECHO} "and lots of free diskspace (~ 7GB)." + ${ECHO_MSG} "and lots of free diskspace (~ 7GB)." .else - @${ECHO} "and a fair amount of free diskspace (~ 1.5GB)." + ${ECHO_MSG} "and a fair amount of free diskspace (~ 1.5GB)." .endif - @${ECHO} + ${ECHO_MSG} post-patch: @${REINPLACE_CMD} -e "s|/usr/local|${LOCALBASE}|" \ --- a.diff ends here ---
Updated to most recent stable release, pulling in a few security fixes and other tweaks. I also tested to make sure this port compiles with a non-standard LOCALBASE, compiled fine. If you previously changed the sysctl kern.ipc.shm_allow_removed for older versions of Chromium, make sure to set that back to the default of 0 for these stable builds, by running 'sysctl kern.ipc.shm_allow_removed=0'. http://chromium.hybridsource.org/chromium-stable-125.shar.txt
Following advice from the FreeBSD Foundation and the security officer, I have tweaked this port to use the official tarball at http://build.chromium.org/buildbot/official/chromium-5.0.375.125.tar.bz2 but with the following directories removed: courgette/ third_party/bsdiff/ third_party/bspatch/ These source directories were never compiled or used by this FreeBSD port, but they have been removed altogether now. As a result, I have removed the RESTRICTED tag from this port. Feel free to add any freebsd.org mirrors for the source tarball. http://chromium.hybridsource.org/chromium-stable-125-safe.shar.txt
Hmm, rerolling distfile by yourself adds one more link to the chain of trust. One would have to verify *you* indeed removed only those directories and haven't altered distfile any other way. Can you quote the reasoning security officer had to advise that? And, please, don't use same distfile name as vendor. It's going to make confusion when people search for mirrors of the file on google.
I've updated this port to the latest stable release 5.0.375.127. Since the FreeBSD Foundation hasn't decided how they want to handle the courgette issue, I've gone back to linking to the official Google-hosted source tarball, rather than hosting a redacted tarball myself, and put the RESTRICTED tag back in. As legal review is the only issue holding back committing this port, I'm going to stop posting updated shar files here and just direct people to my site to get the latest stable port: http://chromium.hybridsource.org/port When the FreeBSD foundation decides what is the best approach legally, we can then commit what I have now or easily remove the courgette directory from the latest source tarball.
Sprewell <chromium@jaggeri.com> writes: > I'm hosting the source myself, so no potential liability can fall on > anyone else, just like with the x264 port. BTW, FreeBSD.org server(s) host source *and* binary packages of h264 decoder (ffmpeg, gstreamer-ffmpeg, mplayer, et al) and encoder (x264) *for years*. I don't understand why "MPEG-LA licensed codecs" are so special in Chromium tarball. So, I vote for enabling CODECS by default.
I don't think there's a risk enabling CODECS by default either. Also most users will fall into one of the following categories: a) user enables CODECS b) user keeps default OPTIONS set and isn't happy because some formats won't play. -- Florent Thoumie flz@FreeBSD.org FreeBSD Committer
Now that the FreeBSD Foundation has decided how to handle this port, I've modified the last 5.0.375.127 port that I submitted according to their requirements. I've removed the courgette/ directory from the official source tarball again, renamed the tarball, and removed the RESTRICTED tag altogether. As before, feel free to add any mirrors. Regarding patented codecs, I think it's better to make users know that those codecs are patented and make them take that extra step to install them. Chromium doesn't compile those patented codecs by default in Google's builds also- I had to modify the build to compile them in- so I don't think users will expect Chromium to have those codecs anyway. However, I don't care too much about it and I always compile the patented codecs in for myself, ;) so feel free to change that. http://chromium.hybridsource.org/chromium-stable-127-redacted.shar.txt
rene 2010-10-13 18:54:31 UTC FreeBSD ports repository Modified files: www Makefile Added files: www/chromium Makefile distinfo pkg-descr pkg-plist www/chromium/files patch-chromium patch-thirdparty Log: Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web. The official site at http://www.chromium.org/Home contains design documents, architecture overviews, testing information, and more to help you learn to build and work with the Chromium source code. You can help support this port of Chromium to FreeBSD by subscribing at http://chromium.hybridsource.org. This port was derived from older work extracted from the weekly subscriber builds. WWW: http://chromium.hybridsource.org The Courgette update code has been removed from the distfile PR: ports/146302 Submitted by: Florent Thoumie [flz at FreeBSD.org], [chromium hybridsource.org] Approved by: FreeBSD Foundation Revision Changes Path 1.2718 +1 -0 ports/www/Makefile 1.1 +115 -0 ports/www/chromium/Makefile (new) 1.1 +3 -0 ports/www/chromium/distinfo (new) 1.1 +4904 -0 ports/www/chromium/files/patch-chromium (new) 1.1 +1039 -0 ports/www/chromium/files/patch-thirdparty (new) 1.1 +11 -0 ports/www/chromium/pkg-descr (new) 1.1 +306 -0 ports/www/chromium/pkg-plist (new) _______________________________________________ cvs-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/cvs-all To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
State Changed From-To: open->closed Committed, thanks
Hi, I have a question regarding the current port of Chromium 5.x and security fixes. Watching the Linux development of Chromium, I see a plethora of urgent security fixes now and then in current stable builds. But then, according to http://chromium.hybridsource.org/ "Weekly builds from the latest Chromium 8.0 trunk and the Chromium 6.0.472 stable branch are available for paid subscribers, plus I spin off a stable, older build for free once or twice a year, currently the last stable 5.0.375 release." it seems there are updates only once in a while. So do we have to pay for "premium support"? Don't get me wrong, I don't have any problems with paid development, but it's quiet crazy nowadays to surf the web on such a basis. Even Chromium isn't immune to such problems as experience shows in the past. So the current stable build is 6.x, the one in ports is 5.x ... I don't need the latest features, but at least there should be some information regarding possible security related fixes. Cheers, Oliver Herold --=20 Gr=C3=BC=C3=9Fe Oliver F!XMBR - http://www.fixmbr.de
Since this 5.0.375.127 release was pushed by Google almost two months ago, it is not the most up-to-date, secure release. Only paid subscribers get those, until enough subscribers fund the full port to get done, after which all patches are eventually open-sourced within a year. There will be no security fixes or info for these older releases in ports as Google doesn't provide that or support them. If you want the most secure up-to-date browser on FreeBSD, you have to pay for it: either directly by funding this FreeBSD port of Chromium until it gets done or indirectly through the Firefox/Opera search deals, that make sure google is the default option in your search engine listing: http://www.searchenginejournal.com/google-opera-renew-ad-deal-but-still-no-gbrowser/5941/
Ruben <chromium@hybridsource.org> writes: >Anonymous <swell.k@gmail.com> writes: > >> BTW, can you compress the distfile for USE_XZ next time. >> >> $ bzip2 -dc chrom*bz2 | xz -9 >chromium-42139.tar.xz >> >> $ du -Ah chrom* >> 132M chromium-42139.tar.bz2 >> 97M chromium-42139.tar.xz $ du -Ah chrom* 155M chromium-courgette-redacted-5.0.375.127.tar.bz2 114M chromium-courgette-redacted-5.0.375.127.tar.xz 187M chromium-courgette-redacted-5.0.375.127.tar.gz >> >> $ time bzip2 -dc chrom*bz2 >/dev/null >> bzip2 -dc chromium-42139.tar.bz2 > /dev/null 17.55s user 0.06s system 99% cpu 17.706 total >> >> $ time xz -dc chrom*xz >/dev/null >> xz -dc chromium-42139.tar.xz > /dev/null 8.85s user 0.15s system 99% cpu 9.047 total >> >> As you can see bz2 archive takes almost twice as much time to decompress. >> On a 9yo system the numbers are greater: 117s (bz2) vs. 41s (xz) Below are some numbers after a few quick runs on zfs (with prefetch). 2yo amd64 box: 21s (bz2) | 11s (xz) | 3s (gz) 9yo i386 box: 132s (bz2) | 48s (xz) | 12s (gz) > > As for using xz rather than bzip2, bandwidth hasn't been a problem yet > but I'll look into switching. It's decompression time, not only compression ratio. If tarball size is not a concern why not compress it with gzip(1) then?